You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to publish to my own feed service npx pilet publish <.tgz file> --url <feed service url> --headers "{\"foo\":\"bar\"}"
The custom headers I receive are
I thought I was passing in the headers in the wrong format, and perhaps I still am (an opportunity for documentation if so), but every way I tried passing the headers had this same result.
Steps to Reproduce
Place a breakpoint on the feed service's /feed/update code
npx pilet publish <.tgz file> --url <feed service url> --headers "{\"foo\":\"bar\"}" (repeat to try any other format for headers)
Great that it works - and thanks for the feedback!
For me this means that we need to strengthen the docs here (examples for each flag would help) and have better error handling in the CLI. Will pick that up as an improvement for 1.6.1.
Bug Report
For more information, see the
CONTRIBUTING
guide.Prerequisites
Environment Details and Version
Pilet version 1.5.3
Mac OS
Description
When trying to publish to my own feed service
npx pilet publish <.tgz file> --url <feed service url> --headers "{\"foo\":\"bar\"}"
The custom headers I receive are
I thought I was passing in the headers in the wrong format, and perhaps I still am (an opportunity for documentation if so), but every way I tried passing the headers had this same result.
Steps to Reproduce
npx pilet publish <.tgz file> --url <feed service url> --headers "{\"foo\":\"bar\"}"
(repeat to try any other format for headers)Expected behavior
Actual behavior
Possible Origin/Solution
I believe the issue stems from converting headers from type 'unknown' to type 'Record<string, string>' in commands.ts
piral/src/tooling/piral-cli/src/commands.ts
Line 685 in 4748c35
piral/src/tooling/piral-cli/src/commands.ts
Line 707 in 4748c35
Then this below causes the results in the faulty headers
piral/src/tooling/piral-cli/src/common/http.ts
Line 218 in 4748c35
Here is a script I used to replicate that same process of unknown -> Record<string,string> -> spread
The text was updated successfully, but these errors were encountered: