gtfs 4.15.3 → 4.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -970,8 +970,8 @@ const stoptimes = getStoptimes({
970
970
  const stoptimes = getStoptimes({
971
971
  stop_id: '70011',
972
972
  date: 20160704,
973
- start_time: 11:30:00,
974
- end_time: 11:45:00
973
+ start_time: '11:30:00',
974
+ end_time: '11:45:00'
975
975
  });
976
976
  ```
977
977
 
@@ -3323,8 +3323,6 @@ var getAgencies = (db, config) => {
3323
3323
  };
3324
3324
  var exportGtfs = async (initialConfig) => {
3325
3325
  const config = setDefaultConfig(initialConfig);
3326
- const log2 = log(config);
3327
- const logWarning2 = logWarning(config);
3328
3326
  const db = openDb(config);
3329
3327
  const agencies = getAgencies(db, config);
3330
3328
  const agencyCount = agencies.length;
@@ -3333,11 +3331,11 @@ var exportGtfs = async (initialConfig) => {
3333
3331
  "No agencies found in SQLite. Be sure to first import data into SQLite using `gtfs-import` or `importGtfs(config);`"
3334
3332
  );
3335
3333
  } else if (agencyCount > 1) {
3336
- logWarning2(
3334
+ logWarning(config)(
3337
3335
  "More than one agency is defined in config.json. Export will merge all into one GTFS file."
3338
3336
  );
3339
3337
  }
3340
- log2(
3338
+ log(config)(
3341
3339
  `Starting GTFS export for ${pluralize3(
3342
3340
  "agency",
3343
3341
  agencyCount,
@@ -3362,7 +3360,7 @@ var exportGtfs = async (initialConfig) => {
3362
3360
  const lines = db.prepare(`SELECT * FROM ${tableName};`).all();
3363
3361
  if (!lines || lines.length === 0) {
3364
3362
  if (!model.nonstandard) {
3365
- log2(
3363
+ log(config)(
3366
3364
  `Skipping (no data) - ${model.filenameBase}.${model.filenameExtension}\r`
3367
3365
  );
3368
3366
  }
@@ -3404,17 +3402,23 @@ var exportGtfs = async (initialConfig) => {
3404
3402
  `Unexpected filename extension: ${model.filenameExtension}`
3405
3403
  );
3406
3404
  }
3407
- log2(`Exporting - ${model.filenameBase}.${model.filenameExtension}\r`);
3405
+ log(config)(
3406
+ `Exporting - ${model.filenameBase}.${model.filenameExtension}\r`
3407
+ );
3408
3408
  return `${model.filenameBase}.${model.filenameExtension}`;
3409
3409
  }
3410
3410
  );
3411
3411
  if (compact2(exportedFiles).length === 0) {
3412
- log2("No GTFS data exported. Be sure to first import data into SQLite.");
3412
+ log(config)(
3413
+ "No GTFS data exported. Be sure to first import data into SQLite."
3414
+ );
3413
3415
  return;
3414
3416
  }
3415
- log2(`Completed GTFS export to ${exportPath}`);
3416
- log2(`Completed GTFS export for ${pluralize3("agency", agencyCount, true)}
3417
- `);
3417
+ log(config)(`Completed GTFS export to ${exportPath}`);
3418
+ log(config)(
3419
+ `Completed GTFS export for ${pluralize3("agency", agencyCount, true)}
3420
+ `
3421
+ );
3418
3422
  };
3419
3423
 
3420
3424
  // src/lib/advancedQuery.ts