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:
+15
-25
@@ -1,15 +1,15 @@
|
||||
'use strict'
|
||||
const { Minipass } = require('minipass')
|
||||
const { MinipassSized } = require('minipass-sized')
|
||||
const MinipassSized = require('minipass-sized')
|
||||
|
||||
const Blob = require('./blob.js')
|
||||
const { BUFFER } = Blob
|
||||
const FetchError = require('./fetch-error.js')
|
||||
|
||||
// optional dependency on 'iconv-lite'
|
||||
let decode
|
||||
// optional dependency on 'encoding'
|
||||
let convert
|
||||
try {
|
||||
decode = require('iconv-lite').decode
|
||||
convert = require('encoding').convert
|
||||
} catch (e) {
|
||||
// defer error until textConverted is called
|
||||
}
|
||||
@@ -92,10 +92,6 @@ class Body {
|
||||
}
|
||||
|
||||
textConverted () {
|
||||
/* istanbul ignore if */
|
||||
if (typeof decode !== 'function') {
|
||||
throw new Error('The package `iconv-lite` must be installed to use the textConverted() function')
|
||||
}
|
||||
return this[CONSUME_BODY]().then(buf => convertBody(buf, this.headers))
|
||||
}
|
||||
|
||||
@@ -289,6 +285,11 @@ const isBlob = obj =>
|
||||
/^(Blob|File)$/.test(obj[Symbol.toStringTag])
|
||||
|
||||
const convertBody = (buffer, headers) => {
|
||||
/* istanbul ignore if */
|
||||
if (typeof convert !== 'function') {
|
||||
throw new Error('The package `encoding` must be installed to use the textConverted() function')
|
||||
}
|
||||
|
||||
const ct = headers && headers.get('content-type')
|
||||
let charset = 'utf-8'
|
||||
let res
|
||||
@@ -338,23 +339,12 @@ const convertBody = (buffer, headers) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (charset === 'UTF-8') {
|
||||
return buffer.toString('UTF-8')
|
||||
}
|
||||
|
||||
charset = charset.toString().trim()
|
||||
.replace(/^latin[-_]?(\d+)$/i, 'ISO-8859-$1')
|
||||
.replace(/^win(?:dows)?[-_]?(\d+)$/i, 'WINDOWS-$1')
|
||||
.replace(/^utf[-_]?(\d+)$/i, 'UTF-$1')
|
||||
.replace(/^ks_c_5601-1987$/i, 'CP949')
|
||||
.replace(/^us[-_]?ascii$/i, 'ASCII')
|
||||
.toUpperCase()
|
||||
try {
|
||||
return decode(buffer, charset).toString()
|
||||
} catch {
|
||||
/* istanbul ignore next */
|
||||
return buffer.toString('UTF-8')
|
||||
}
|
||||
// turn raw buffers into a single utf-8 buffer
|
||||
return convert(
|
||||
buffer,
|
||||
'UTF-8',
|
||||
charset
|
||||
).toString()
|
||||
}
|
||||
|
||||
module.exports = Body
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "minipass-fetch",
|
||||
"version": "5.0.2",
|
||||
"version": "4.0.1",
|
||||
"description": "An implementation of window.fetch in Node.js using Minipass streams",
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
@@ -25,12 +25,12 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@npmcli/eslint-config": "^5.0.0",
|
||||
"@npmcli/template-oss": "4.27.1",
|
||||
"@npmcli/template-oss": "4.23.3",
|
||||
"@ungap/url-search-params": "^0.2.2",
|
||||
"abort-controller": "^3.0.0",
|
||||
"abortcontroller-polyfill": "~1.7.3",
|
||||
"encoding": "^0.1.13",
|
||||
"form-data": "^4.0.0",
|
||||
"iconv-lite": "^0.7.2",
|
||||
"nock": "^13.2.4",
|
||||
"parted": "^0.1.1",
|
||||
"string-to-arraybuffer": "^1.0.2",
|
||||
@@ -38,11 +38,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"minipass": "^7.0.3",
|
||||
"minipass-sized": "^2.0.0",
|
||||
"minipass-sized": "^1.0.3",
|
||||
"minizlib": "^3.0.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"iconv-lite": "^0.7.2"
|
||||
"encoding": "^0.1.13"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -59,12 +59,12 @@
|
||||
"lib/"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^20.17.0 || >=22.9.0"
|
||||
"node": "^18.17.0 || >=20.5.0"
|
||||
},
|
||||
"author": "GitHub Inc.",
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"version": "4.27.1",
|
||||
"version": "4.23.3",
|
||||
"publish": "true"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user