Skip to content

SP-874: Add single package import command#369

Draft
Zgjim Haziri (ZgjimHaziri) wants to merge 1 commit into
mainfrom
SP-874-add-single-package-import-command
Draft

SP-874: Add single package import command#369
Zgjim Haziri (ZgjimHaziri) wants to merge 1 commit into
mainfrom
SP-874-add-single-package-import-command

Conversation

@ZgjimHaziri
Copy link
Copy Markdown
Contributor

Description

Adds a new config package import command for importing a single package — the CLI counterpart to the new pacman single-package import API (POST /pacman/api/core/staging/packages/import-file).

How it was done:

  • Added it under a new config package subgroup instead of overloading the existing batch config import. The two use different, non-interchangeable archive formats (the batch archive has nested per-package zips + manifest; the single-package format is a flat package.json + nodes/), so keeping them separate avoids confusing the workflows.
  • The command imports from a package zip (--file) or a directory (--directory, which the CLI flat-zips before upload), with an --overwrite flag and optional --json output. A 4 GB uncompressed guard is enforced on the archive.
  • Reframed the config docs and CLI help so the package commands read as the default for working with a package, and the batch commands are presented as their own batch-specific set whose artifacts don't mix with the single-package format.

Relevant links

Checklist

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios (unit tests cover file/directory imports, overwrite, JSON output, and the validation/error paths; full suite green)
  • I have updated docs if needed

Includes-AI-Code: true

Made with Cursor

Adds the CLI counterpart to the new pacman single-package import API. The
command lives under a new 'config package' subgroup, separate from the existing
batch 'config import', because the two use different, non-interchangeable
archive formats. Supports importing from a package zip (--file) or a directory
(--directory, flat-zipped by the CLI), with --overwrite and optional --json
output. Config docs and CLI help updated to frame the batch commands as their
own batch-specific set.

Includes-AI-Code: true
Co-authored-by: Cursor <cursoragent@cursor.com>
@ZgjimHaziri Zgjim Haziri (ZgjimHaziri) changed the title SP-874: add 'config package import' command for single-package import SP-874: Add single package import command Jun 4, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant