diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89c38e2..5a50383 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: branches: - main repository_dispatch: - types: [ ci ] + types: [ci] workflow_dispatch: jobs: diff --git a/docs/diary/2024-03-25.md b/docs/diary/2024-03-25.md index c080b59..9948a29 100644 --- a/docs/diary/2024-03-25.md +++ b/docs/diary/2024-03-25.md @@ -62,12 +62,7 @@ Created and loaded store in ./IDFM-gtfs/services.db Created and loaded store in ./IDFM-gtfs/trips.db Creating Connection rules... /Users/vincenthardouin/.npm/_npx/4c8ae9a5fcd59e62/node_modules/gtfs2lc/lib/stoptimes/st2c.js:45 - if (arrivalStop['stop_headsign'] && arrivalStop['stop_headsign'] !== '') { - ^ - -TypeError: Cannot read properties of undefined (reading 'stop_headsign') - at StopTimesToConnections._transform (/Users/vincenthardouin/.npm/_npx/4c8ae9a5fcd59e62/node_modules/gtfs2lc/lib/stoptimes/st2c.js:45:20) - at process.processTicksAndRejections (node:internal/process/task_queues:95:5) +if (arrivalStop['stop_headsign'] && arrivalStop['stop_headsign'] !== '') { ``` Soyons pragmatiques, mes données viennent d'IDFM et je lance le script normalement, ça devrait fonctionner. diff --git a/scripts/PgClient.js b/scripts/PgClient.js index 12c8929..ba96063 100644 --- a/scripts/PgClient.js +++ b/scripts/PgClient.js @@ -11,7 +11,8 @@ class PgClient { const instance = new PgClient(databaseUrl); try { await instance.client.connect(); - } catch (error) { + } + catch (error) { console.error('Database error', error); } return instance; diff --git a/scripts/add-adjacent-stations.js b/scripts/add-adjacent-stations.js index cb1f3cc..705d39a 100644 --- a/scripts/add-adjacent-stations.js +++ b/scripts/add-adjacent-stations.js @@ -42,7 +42,7 @@ export function addAdjacentStations({ linesData, stationsData }) { stations.forEach((station) => { if (!station.properties.adjacentStations) - // eslint-disable-next-line no-console + console.log('Station is missing adjacentStations', station.properties.name); if (station.properties.adjacentStations) { diff --git a/scripts/database/empty-database.js b/scripts/database/empty-database.js index f0301ab..dab1830 100644 --- a/scripts/database/empty-database.js +++ b/scripts/database/empty-database.js @@ -12,6 +12,7 @@ async function main() { } catch (error) { console.error(error); + // eslint-disable-next-line node/prefer-global/process process.exitCode = 1; } finally {