Skip to main content

Module architect_import

Module architect_import 

Source
Expand description

Bounded, link-free staging for Architect folder and archive imports.

Structsยง

SourceWriter ๐Ÿ”’
Tracks expansion limits and duplicate paths across one upload.
UploadedSource ๐Ÿ”’
Owns disposable staging separately from the selected source app root.

Constantsยง

MAX_EXPANDED_BYTES ๐Ÿ”’
MAX_FILES ๐Ÿ”’
MAX_UPLOAD_BYTES ๐Ÿ”’

Functionsยง

extract_tar ๐Ÿ”’
Reads TAR entries with a bound on the entire decompressed stream, including metadata.
extract_zip ๐Ÿ”’
Extracts ZIP entries through the bounded source writer rather than unpacking paths.
find_app_root ๐Ÿ”’
Requires one app at the upload root or inside a single enclosing folder.
safe_relative_path ๐Ÿ”’
Rejects absolute, parent, Windows-prefixed, and control-character paths.
stage_upload ๐Ÿ”’
Stages exactly one folder or supported archive and owns cleanup until import completes.