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:
+10
-21
@@ -91,9 +91,8 @@ var os2 = require("os");
|
||||
var path2 = require("path");
|
||||
var zlib = require("zlib");
|
||||
var https = require("https");
|
||||
var crypto = require("crypto");
|
||||
var child_process = require("child_process");
|
||||
var packageJSON = require(path2.join(__dirname, "package.json"));
|
||||
var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
|
||||
var toPath = path2.join(__dirname, "bin", "esbuild");
|
||||
var isToPathJS = true;
|
||||
function validateBinaryVersion(...command) {
|
||||
@@ -133,8 +132,8 @@ which means the "esbuild" binary executable can't be run. You can either:
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
if (stdout !== packageJSON.version) {
|
||||
throw new Error(`Expected ${JSON.stringify(packageJSON.version)} but got ${JSON.stringify(stdout)}`);
|
||||
if (stdout !== versionFromPackageJSON) {
|
||||
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
|
||||
}
|
||||
}
|
||||
function isYarn() {
|
||||
@@ -185,11 +184,10 @@ function installUsingNPM(pkg, subpath, binPath) {
|
||||
try {
|
||||
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
||||
child_process.execSync(
|
||||
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${packageJSON.version}`,
|
||||
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
|
||||
{ cwd: installDir, stdio: "pipe", env }
|
||||
);
|
||||
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
||||
binaryIntegrityCheck(pkg, subpath, fs2.readFileSync(installedBinPath));
|
||||
fs2.renameSync(installedBinPath, binPath);
|
||||
} finally {
|
||||
try {
|
||||
@@ -222,7 +220,8 @@ require('child_process').execFileSync(${pathString}, process.argv.slice(2), { st
|
||||
fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
|
||||
${code}`);
|
||||
}
|
||||
function maybeOptimizePackage(binPath, isWASM) {
|
||||
function maybeOptimizePackage(binPath) {
|
||||
const { isWASM } = pkgAndSubpathForCurrentPlatform();
|
||||
if (os2.platform() !== "win32" && !isYarn() && !isWASM) {
|
||||
const tempPath = path2.join(__dirname, "bin-esbuild");
|
||||
try {
|
||||
@@ -234,20 +233,11 @@ function maybeOptimizePackage(binPath, isWASM) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function binaryIntegrityCheck(pkg, subpath, bytes) {
|
||||
const hash = crypto.createHash("sha256").update(bytes).digest("hex");
|
||||
const key = `${pkg}/${subpath}`;
|
||||
const expected = packageJSON["esbuild.binaryHashes"][key];
|
||||
if (!expected) throw new Error(`Missing hash for "${key}"`);
|
||||
if (hash !== expected) throw new Error(`"${hash.slice(0, 8)}..." doesn't match "${expected.slice(0, 8)}..."`);
|
||||
}
|
||||
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
||||
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${packageJSON.version}.tgz`;
|
||||
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
|
||||
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
||||
try {
|
||||
const bytes = extractFileFromTarGzip(await fetch(url), subpath);
|
||||
binaryIntegrityCheck(pkg, subpath, bytes);
|
||||
fs2.writeFileSync(binPath, bytes);
|
||||
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
||||
fs2.chmodSync(binPath, 493);
|
||||
} catch (e) {
|
||||
console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
|
||||
@@ -263,7 +253,7 @@ async function checkAndPreparePackage() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
|
||||
const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
|
||||
let binPath;
|
||||
try {
|
||||
binPath = require.resolve(`${pkg}/${subpath}`);
|
||||
@@ -275,7 +265,6 @@ package.json feature is used by esbuild to install the correct binary executable
|
||||
for your current platform. This install script will now attempt to work around
|
||||
this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
|
||||
`);
|
||||
if (isWASM) throw new Error(`Failed to install package "${pkg}"`);
|
||||
binPath = downloadedBinPath(pkg, subpath);
|
||||
try {
|
||||
console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
|
||||
@@ -289,7 +278,7 @@ this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
|
||||
}
|
||||
}
|
||||
}
|
||||
maybeOptimizePackage(binPath, isWASM);
|
||||
maybeOptimizePackage(binPath);
|
||||
}
|
||||
checkAndPreparePackage().then(() => {
|
||||
if (isToPathJS) {
|
||||
|
||||
Reference in New Issue
Block a user