Files
osmWorkflow/.trellis/tasks/08-26-rc-p5b-zip-import/design.md

1.1 KiB

P5B ZIP Import Design

scripts/lib/native-road-package.js becomes the single host adapter. It resolves the config-relative ZIP path, hashes it, validates central-directory entry names and metadata, and extracts only accepted regular files to _pipeline/native-road-import/<sha256>/. It validates the unpacked manifest and returns an immutable package descriptor:

{ zipFile, zipRecord, rootDir, manifest, records }

The descriptor replaces area.outputs.nativeRoadDir as native input for Blender, native preview traffic, diagnostics and stage manifests. The configured ZIP and unpacked cache are inputs, never published area outputs. Cache invalidation is by ZIP SHA-256; cleanup only deletes importer-owned hash directories.

The importer rejects any non-root-flat layout, duplicate path, symlink, unsupported compression/error, path traversal, invalid manifest, area mismatch or declared/published mismatch before Blender starts. The native compiler CLI dependency and host-owned nativeRoad compilation options are removed. Legacy osm2streets remains an explicit separate provider.