feat: add immutable road revision storage
This commit is contained in:
@@ -9,6 +9,7 @@ const { generate, validateDocument, runtime } = require('../src/native-traffic-s
|
||||
const { convertGeoJson } = require('../src/reference/gaode');
|
||||
const { exportNativeRoadPackage } = require('../src/export/native-road-package');
|
||||
const { compileInput } = require('../src/compile/compiler');
|
||||
const { ensureRevisionStore } = require('../src/compile/road-revisions');
|
||||
|
||||
function startWorkbench({
|
||||
area = null,
|
||||
@@ -167,6 +168,9 @@ function handle(request, response, session) {
|
||||
}
|
||||
|
||||
function state(area, junctionReference = null, debug = false) {
|
||||
// This is the read entry point for both a fresh import and a reopened legacy
|
||||
// workspace. Initialization only adds the v2 layout; it never rewrites v1 files.
|
||||
ensureRevisionStore(path.dirname(area.input));
|
||||
const nativeDir = area.outputs.nativeRoadDir;
|
||||
const osm2streetsRoadSurface = area.outputs.geojsonDir
|
||||
? path.join(area.outputs.geojsonDir, 'road_surface.geojson')
|
||||
@@ -325,6 +329,7 @@ function readUpload(request, session) {
|
||||
);
|
||||
try {
|
||||
const compiled = compileInput(input);
|
||||
ensureRevisionStore(root);
|
||||
session.area = compiled.area;
|
||||
return compiled;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user