-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Port path api to js #1006
Conversation
Would you please give some context behind the purpose of this PR and if it's related to prior discussion or an issue? |
The purpose it to make accessing these directories available from js side. I think it can ease the development for tauri users a bit, since they won't have to write this by themselves. No, this is not related to prior discussion but I think there is an issue open #929 . |
I pushed new changes but I am not sure if I named the endpoints and methods correctly. If you have some better names or other comments, let me know. |
@@ -8,7 +8,8 @@ import { BaseDirectory } from './fs' | |||
*/ | |||
async function appDir(): Promise<string> { | |||
return await promisified<string>({ | |||
cmd: 'getDirectory', | |||
cmd: 'resolvePath', | |||
path: '.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasfernog this will add a "dot" to the end of the path, I believe an empty string is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing, if a base directory doesn't exist, the user will get an error like this Path Error:unable to determine base dir path
. In my opinion this will confuse the user as he doesn't know the underlying api is just resolving a path using a base dir, instead it would be better to just return null like tauri's Path api in rust.
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
wry has been supported http/socks5 proxy in [tauri-apps#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me>
* feat(wry): support proxy in wry runtime wry has been supported http/socks5 proxy in [#1006](tauri-apps/wry#1006), which has been merged in [commit 3cc4d79](tauri-apps/wry@3cc4d79). This patch aims to support its feature. Signed-off-by: lin fu <river@vvl.me> * Apply suggestions from code review * Apply suggestions from code review * Update core/tauri-runtime-wry/src/lib.rs * Update core/tauri/src/window/mod.rs * add macos-proxy flag * add change file * delete file * update change file * use macos-14 runner to test core --------- Signed-off-by: lin fu <river@vvl.me> Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.studio> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
fix: #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Closes #929