feat:encode sfn > functionId & extractedFilename#1872
feat:encode sfn > functionId & extractedFilename#1872thinke5 wants to merge 5 commits intosolidjs:1.xfrom
Conversation
|
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Could probably use a simple hash such as a xxhash32(filename), but otherwise this is fine. |
|
|
I have come up with a solution that can use hash algorithm,` HandleServerFunction does not require decoding. I need some time to verify |
|
I don't think we need to decode anything. We just use the IDs for lookup and verification anyways. |
|
Now,only Encode In addition, I found that |
|
@lxsmnsyc any other comments on this pr? |
|
@brenelz this PR is fine, but we'll need a solution that outputs a shorter output like xxhash32 |
|
@thinke5 did you want to look at this following Alexis' comment? |
TanStack Server Functions already encodes the name into the function id: https://github.com/TanStack/router/blob/40b7576ff89d549af1218a1925c7cfaf9e85d724/packages/server-functions-plugin/src/index.ts#L111 Refs: #1859, #1872
TanStack Server Functions already encodes the name into the function id: https://github.com/TanStack/router/blob/40b7576ff89d549af1218a1925c7cfaf9e85d724/packages/server-functions-plugin/src/index.ts#L111 Refs: #1859, #1872
TanStack Server Functions already encodes the name into the function id: https://github.com/TanStack/router/blob/40b7576ff89d549af1218a1925c7cfaf9e85d724/packages/server-functions-plugin/src/index.ts#L111 Refs: #1859, #1872
|
@katywings can we close this pr now? Looks like you referenced some of this stuff in the new version? |
PR Checklist
Please check if your PR fulfills the following requirements:
'use server'will cause an error when there is Chinese in the file path #1859What is the current behavior?
What is the new behavior?
Other information
The encoded characters are guaranteed to be ASCII characters, and the path before
srcis removed to improve security and reduce string sizeCurrently encoded as base64, the size increases by 25%, but I don't know if there is a better way