feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -163,7 +163,7 @@ async function build (gyp, argv) {
|
||||
if (!isNaN(j) && j > 0) {
|
||||
argv.push('/m:' + j)
|
||||
} else if (jobs.toUpperCase() === 'MAX') {
|
||||
argv.push('/m:' + require('os').availableParallelism())
|
||||
argv.push('/m:' + require('os').cpus().length)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -178,7 +178,7 @@ async function build (gyp, argv) {
|
||||
argv.push(j)
|
||||
} else if (jobs.toUpperCase() === 'MAX') {
|
||||
argv.push('--jobs')
|
||||
argv.push(require('os').availableParallelism())
|
||||
argv.push(require('os').cpus().length)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-55
@@ -1,5 +1,4 @@
|
||||
const { Readable } = require('stream')
|
||||
const { EnvHttpProxyAgent } = require('undici')
|
||||
const fetch = require('make-fetch-happen')
|
||||
const { promises: fs } = require('graceful-fs')
|
||||
const log = require('./log')
|
||||
|
||||
@@ -11,65 +10,19 @@ async function download (gyp, url) {
|
||||
'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`,
|
||||
Connection: 'keep-alive'
|
||||
},
|
||||
dispatcher: await createDispatcher(gyp)
|
||||
proxy: gyp.opts.proxy,
|
||||
noProxy: gyp.opts.noproxy
|
||||
}
|
||||
|
||||
let res
|
||||
try {
|
||||
res = await fetch(url, requestOpts)
|
||||
} catch (err) {
|
||||
// Built-in fetch wraps low-level errors in "TypeError: fetch failed" with
|
||||
// the underlying error on .cause. Callers inspect .code (e.g. ENOTFOUND).
|
||||
if (err.cause) {
|
||||
throw err.cause
|
||||
}
|
||||
throw err
|
||||
const cafile = gyp.opts.cafile
|
||||
if (cafile) {
|
||||
requestOpts.ca = await readCAFile(cafile)
|
||||
}
|
||||
|
||||
const res = await fetch(url, requestOpts)
|
||||
log.http(res.status, res.url)
|
||||
|
||||
const body = res.body ? Readable.fromWeb(res.body) : Readable.from([])
|
||||
return {
|
||||
status: res.status,
|
||||
url: res.url,
|
||||
body,
|
||||
text: async () => {
|
||||
let data = ''
|
||||
body.setEncoding('utf8')
|
||||
for await (const chunk of body) {
|
||||
data += chunk
|
||||
}
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function createDispatcher (gyp) {
|
||||
const env = process.env
|
||||
const hasProxyEnv = env.http_proxy || env.HTTP_PROXY || env.https_proxy || env.HTTPS_PROXY
|
||||
if (!gyp.opts.proxy && !gyp.opts.cafile && !hasProxyEnv) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const opts = {}
|
||||
if (gyp.opts.cafile) {
|
||||
const ca = await readCAFile(gyp.opts.cafile)
|
||||
// EnvHttpProxyAgent forwards opts to both its internal Agent (direct) and
|
||||
// ProxyAgent (proxied). Agent reads TLS config from `connect`; ProxyAgent
|
||||
// reads it from `requestTls` (origin) / `proxyTls` (proxy). Set all three
|
||||
// so the custom CA is applied regardless of which path a request takes.
|
||||
opts.connect = { ca }
|
||||
opts.requestTls = { ca }
|
||||
opts.proxyTls = { ca }
|
||||
}
|
||||
if (gyp.opts.proxy) {
|
||||
opts.httpProxy = gyp.opts.proxy
|
||||
opts.httpsProxy = gyp.opts.proxy
|
||||
}
|
||||
if (gyp.opts.noproxy) {
|
||||
opts.noProxy = gyp.opts.noproxy
|
||||
}
|
||||
return new EnvHttpProxyAgent(opts)
|
||||
return res
|
||||
}
|
||||
|
||||
async function readCAFile (filename) {
|
||||
|
||||
+8
-2
@@ -86,10 +86,14 @@ class PythonFinder {
|
||||
{
|
||||
before: () => {
|
||||
if (!this.configPython) {
|
||||
this.addLog('--python was not set on the command line')
|
||||
this.addLog(
|
||||
'Python is not set from command line or npm configuration')
|
||||
return SKIP
|
||||
}
|
||||
this.addLog(`--python=${this.configPython} was set on the command line`)
|
||||
this.addLog('checking Python explicitly set from command line or ' +
|
||||
'npm configuration')
|
||||
this.addLog('- "--python=" or "npm config get python" is ' +
|
||||
`"${this.configPython}"`)
|
||||
},
|
||||
check: () => this.checkCommand(this.configPython)
|
||||
},
|
||||
@@ -291,6 +295,8 @@ class PythonFinder {
|
||||
`- Use the switch --python="${pathExample}"`,
|
||||
' (accepted by both node-gyp and npm)',
|
||||
'- Set the environment variable PYTHON',
|
||||
'- Set the npm configuration variable python:',
|
||||
` npm config set python "${pathExample}"`,
|
||||
'For more information consult the documentation at:',
|
||||
'https://github.com/nodejs/node-gyp#installation',
|
||||
'**********************************************************'
|
||||
|
||||
+6
-12
@@ -30,7 +30,7 @@ class VisualStudioFinder {
|
||||
this.configVersionYear = null
|
||||
this.configPath = null
|
||||
if (this.configMsvsVersion) {
|
||||
this.addLog(`--msvs_version=${this.configMsvsVersion} was set on the command line`)
|
||||
this.addLog('msvs_version was set from command line or npm config')
|
||||
if (this.configMsvsVersion.match(/^\d{4}$/)) {
|
||||
this.configVersionYear = parseInt(this.configMsvsVersion, 10)
|
||||
this.addLog(
|
||||
@@ -41,7 +41,7 @@ class VisualStudioFinder {
|
||||
`- looking for Visual Studio installed in "${this.configPath}"`)
|
||||
}
|
||||
} else {
|
||||
this.addLog('--msvs_version was not set on the command line')
|
||||
this.addLog('msvs_version not set from command line or npm config')
|
||||
}
|
||||
|
||||
if (process.env.VCINSTALLDIR) {
|
||||
@@ -119,7 +119,7 @@ class VisualStudioFinder {
|
||||
}
|
||||
|
||||
async findVisualStudio2019OrNewerFromSpecifiedLocation () {
|
||||
return this.findVSFromSpecifiedLocation([2019, 2022, 2026])
|
||||
return this.findVSFromSpecifiedLocation([2019, 2022])
|
||||
}
|
||||
|
||||
async findVisualStudio2017FromSpecifiedLocation () {
|
||||
@@ -162,7 +162,7 @@ class VisualStudioFinder {
|
||||
}
|
||||
|
||||
async findVisualStudio2019OrNewerUsingSetupModule () {
|
||||
return this.findNewVSUsingSetupModule([2019, 2022, 2026])
|
||||
return this.findNewVSUsingSetupModule([2019, 2022])
|
||||
}
|
||||
|
||||
async findVisualStudio2017UsingSetupModule () {
|
||||
@@ -223,7 +223,7 @@ class VisualStudioFinder {
|
||||
// Invoke the PowerShell script to get information about Visual Studio 2019
|
||||
// or newer installations
|
||||
async findVisualStudio2019OrNewer () {
|
||||
return this.findNewVS([2019, 2022, 2026])
|
||||
return this.findNewVS([2019, 2022])
|
||||
}
|
||||
|
||||
// Invoke the PowerShell script to get information about Visual Studio 2017
|
||||
@@ -247,7 +247,7 @@ class VisualStudioFinder {
|
||||
'Unrestricted',
|
||||
'-NoProfile',
|
||||
'-Command',
|
||||
'&{Add-Type -IgnoreWarnings -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}'
|
||||
'&{Add-Type -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}'
|
||||
]
|
||||
|
||||
this.log.silly('Running', ps, psArgs)
|
||||
@@ -389,10 +389,6 @@ class VisualStudioFinder {
|
||||
ret.versionYear = 2022
|
||||
return ret
|
||||
}
|
||||
if (ret.versionMajor === 18) {
|
||||
ret.versionYear = 2026
|
||||
return ret
|
||||
}
|
||||
this.log.silly('- unsupported version:', ret.versionMajor)
|
||||
return {}
|
||||
}
|
||||
@@ -460,8 +456,6 @@ class VisualStudioFinder {
|
||||
return 'v142'
|
||||
} else if (versionYear === 2022) {
|
||||
return 'v143'
|
||||
} else if (versionYear === 2026) {
|
||||
return 'v145'
|
||||
}
|
||||
this.log.silly('- invalid versionYear:', versionYear)
|
||||
return null
|
||||
|
||||
+1
-1
@@ -198,7 +198,7 @@ async function install (gyp, argv) {
|
||||
}
|
||||
|
||||
// download the tarball and extract!
|
||||
// Omitted on Windows if only new node.lib is required
|
||||
// Ommited on Windows if only new node.lib is required
|
||||
|
||||
// there can be file errors from tar if parallel installs
|
||||
// are happening (not uncommon with multiple native modules) so
|
||||
|
||||
+19
-17
@@ -1,6 +1,9 @@
|
||||
/* eslint-disable n/no-deprecated-api */
|
||||
|
||||
'use strict'
|
||||
|
||||
const semver = require('semver')
|
||||
const url = require('url')
|
||||
const path = require('path')
|
||||
const log = require('./log')
|
||||
|
||||
@@ -71,11 +74,11 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {
|
||||
} else {
|
||||
distBaseUrl = 'https://nodejs.org/dist'
|
||||
}
|
||||
distBaseUrl = new URL(distBaseUrl + '/v' + version + '/')
|
||||
distBaseUrl += '/v' + version + '/'
|
||||
|
||||
// new style, based on process.release so we have a lot of the data we need
|
||||
if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) {
|
||||
baseUrl = new URL('./', defaultRelease.headersUrl)
|
||||
baseUrl = url.resolve(defaultRelease.headersUrl, './')
|
||||
libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major)
|
||||
libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major)
|
||||
libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major)
|
||||
@@ -93,28 +96,28 @@ function processRelease (argv, gyp, defaultVersion, defaultRelease) {
|
||||
// have a *-headers.tar.gz file in its dist location, even some frankenstein
|
||||
// custom version
|
||||
canGetHeaders = semver.satisfies(versionSemver, headersTarballRange)
|
||||
tarballUrl = new URL(name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz', baseUrl).href
|
||||
tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz')
|
||||
}
|
||||
|
||||
return {
|
||||
version,
|
||||
semver: versionSemver,
|
||||
name,
|
||||
baseUrl: baseUrl.href,
|
||||
baseUrl,
|
||||
tarballUrl,
|
||||
shasumsUrl: new URL('SHASUMS256.txt', baseUrl).href,
|
||||
shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'),
|
||||
versionDir: (name !== 'node' ? name + '-' : '') + version,
|
||||
ia32: {
|
||||
libUrl: libUrl32.href,
|
||||
libPath: normalizePath(path.relative(baseUrl.pathname, libUrl32.pathname))
|
||||
libUrl: libUrl32,
|
||||
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path))
|
||||
},
|
||||
x64: {
|
||||
libUrl: libUrl64.href,
|
||||
libPath: normalizePath(path.relative(baseUrl.pathname, libUrl64.pathname))
|
||||
libUrl: libUrl64,
|
||||
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path))
|
||||
},
|
||||
arm64: {
|
||||
libUrl: libUrlArm64.href,
|
||||
libPath: normalizePath(path.relative(baseUrl.pathname, libUrlArm64.pathname))
|
||||
libUrl: libUrlArm64,
|
||||
libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,21 +127,20 @@ function normalizePath (p) {
|
||||
}
|
||||
|
||||
function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
|
||||
if (!defaultUrl.pathname) defaultUrl = new URL(defaultUrl)
|
||||
const base = new URL('./', defaultUrl)
|
||||
const hasLibUrl = bitsre.test(defaultUrl.pathname) || (versionMajor === 3 && bitsreV3.test(defaultUrl.pathname))
|
||||
const base = url.resolve(defaultUrl, './')
|
||||
const hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
|
||||
|
||||
if (!hasLibUrl) {
|
||||
// let's assume it's a baseUrl then
|
||||
if (versionMajor >= 1) {
|
||||
return new URL('win-' + arch + '/' + name + '.lib', base)
|
||||
return url.resolve(base, 'win-' + arch + '/' + name + '.lib')
|
||||
}
|
||||
// prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/
|
||||
return new URL((arch === 'x86' ? '' : arch + '/') + name + '.lib', base)
|
||||
return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib')
|
||||
}
|
||||
|
||||
// else we have a proper url to a .lib, just make sure it's the right arch
|
||||
return new URL(defaultUrl.pathname.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/'), defaultUrl)
|
||||
return defaultUrl.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/')
|
||||
}
|
||||
|
||||
module.exports = processRelease
|
||||
|
||||
Reference in New Issue
Block a user