fix(cli): stage dynamic plugins via npm pack#112
Open
gashcrumb wants to merge 1 commit into
Open
Conversation
0fb09d7 to
1aa5a7e
Compare
Replace recursive copy of each dist-dynamic directory when running plugin package with the same contents npm would publish: npm pack into a scratch directory, extract the tarball with tar --strip-components=1, and keep the flattened layout expected by the OCI / --export-to flow. This matches publish semantics from dist-dynamic package.json (files, bundleDependencies, etc.), omits node_modules/.bin entries that referenced absolute paths on the builder machine and triggered "link outside of the archive" warnings during dynamic plugin install from OCI images (RHDHBUGS-1968). Run npm/tar through spawn bash with shell: false and stdio redirected to an anonymous log fd so chatter does not clutter the CLI; Task.forCommand is not used (no env for pack placeholders) nor run() (shell: true can still surface npm output). On staging failure the log contents are printed, then discarded. This change also adjusts the e2e test assertions which where asserting on the old recursive copy behavior to now compare using an independent `npm pack` step Assisted-By: Cursor Desktop rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Replace recursive copy of each dist-dynamic directory when running plugin package with the same contents npm would publish: npm pack into a scratch directory, extract the tarball with tar --strip-components=1, and keep the flattened layout expected by the OCI / --export-to flow.
This matches publish semantics from dist-dynamic package.json (files, bundleDependencies, etc.), omits node_modules/.bin entries that referenced absolute paths on the builder machine and triggered "link outside of the archive" warnings during dynamic plugin install from OCI images (RHDHBUGS-1968).
Run npm/tar through spawn bash with shell: false and stdio redirected to an anonymous log fd so chatter does not clutter the CLI; Task.forCommand is not used (no env for pack placeholders) nor run() (shell: true can still surface npm output). On staging failure the log contents are printed, then discarded.
This change also adjusts the e2e test assertions which where asserting
on the old recursive copy behavior to now compare using an independent
npm packstepFixes RHDHBUGS-1968
Assisted-By: Cursor Desktop
rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED