fix: @W-23480808 - map parent folder for all entries in compression and add additional bundle name validation - #64
Conversation
|
Nice- nesting under a single wrapper dir is the right call, and keeping it CLI-side (vs. relaxing the server guard) is exactly what we want. One gap before this fully closes the server-validation error, though:
Must start with a letter; only letters/digits/underscores after. Since we pass basename(dir) through verbatim, common directory names still 400 — just with a different validation message: --bundle-dir ./my-bundle → hyphen → rejected The unit tests don't surface this because they stub the connection (server validation never runs) and the mkdtemp fixtures happen to be hyphenated (upload-test-dir-…) but are only asserted structurally. Suggestion: Reconcile the wrapper name with requestedName/--bundle-name (the developer name should match it anyway), or sanitize basename to the allowlist and fail early with a clear CLI error when it can't be made valid — sanitizing silently risks a mismatch with requestedName, so aligning the two reads cleaner. A test with a hyphenated --bundle-dir name (asserting the produced wrapper is allowlist-valid) would lock it in. Minor: --zip-file (BYO zip) is untouched, so a pre-flattened zip still trips the server guard — probably fine to leave as the user's responsibility, but worth a note in the PR body since it currently reads as a blanket fix. |
…ion' of https://github.com/salesforcecli/plugin-ui-bundle-dev into t/ui-bundles-miyo/w-23480808/map-parent-folder-compression
What does this PR do?
What issues does this PR fix or reference?
@W-23480808@