gtfs 4.15.3 → 4.15.5
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 +2 -2
- package/dist/bin/gtfs-export.js +14 -10
- package/dist/bin/gtfs-export.js.map +1 -1
- package/dist/bin/gtfs-import.js +20 -26
- package/dist/bin/gtfs-import.js.map +1 -1
- package/dist/bin/gtfsrealtime-update.js +14 -21
- package/dist/bin/gtfsrealtime-update.js.map +1 -1
- package/dist/index.js +48 -57
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
package/dist/bin/gtfs-export.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3412
|
+
log(config)(
|
|
3413
|
+
"No GTFS data exported. Be sure to first import data into SQLite."
|
|
3414
|
+
);
|
|
3413
3415
|
return;
|
|
3414
3416
|
}
|
|
3415
|
-
|
|
3416
|
-
|
|
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
|