Skip to content

@W-22482570 b2c job import: support subset of files/globs from a directory#428

Open
clavery wants to merge 1 commit into
mainfrom
feat/job-import-path-subset
Open

@W-22482570 b2c job import: support subset of files/globs from a directory#428
clavery wants to merge 1 commit into
mainfrom
feat/job-import-path-subset

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented May 14, 2026

Summary

  • b2c job import <dir> now accepts an optional list of paths or globs after TARGET to import a subset of a site export. Layout under TARGET is preserved inside the archive; backward compatible (no extras = whole dir).
  • New paths option on the SDK's siteArchiveImport operation; debug logging shows resolved entries and final archive contents.
  • Doc + user-facing skill updates, unit tests for SDK + CLI, changeset.

Resolution order per entry: literal path → path relative to TARGET → internal glob expansion against TARGET. Entries that escape the root, missing literal paths, and globs that match nothing all error.

b2c job import ./my-site-data sites/RefArch libraries/mylib
b2c job import ./my-site-data 'libraries/**'

GUS: W-22482570 (request from Professional Services).

Test plan

  • pnpm --filter @salesforce/b2c-tooling-sdk run test:agent — 1729 passing (5 new SDK cases for path filtering)
  • pnpm --filter @salesforce/b2c-cli run test:agent — 1232 passing (3 new CLI cases)
  • pnpm run lint:agent clean
  • pnpm run typecheck:agent clean
  • Manual export/import roundtrip against a real instance: full dir, single subdir, multiple subdirs, glob patterns, and --debug log output verified
  • Reviewer: verify --remote still rejects extra positionals
  • Reviewer: verify backward compatibility (no extra args = identical archive contents to today)

…ctory

`b2c job import <dir>` now accepts an optional list of paths or globs
after `TARGET` to import a subset of a site export. Each entry is
resolved literally first (handles shell-expanded paths), then against
the import root, then via internal glob expansion. Entries must resolve
under `TARGET`; archive layout is preserved. Backward compatible — no
extras = whole directory, today's behavior.

Adds a corresponding `paths` option on `siteArchiveImport` (SDK), debug
logging that surfaces resolved entries and final archive contents,
unit tests for both surfaces, doc/skill updates, and a changeset.
@clavery clavery requested a review from charithaT07 May 14, 2026 02:29
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