Skip to content

Commit d2a8d76

Browse files
feat(deps): Add new dependencies and update CSP for local development
This commit introduces several new dependencies to the project, including `grep-regex`, `grep-searcher`, `http`, `lazy_static`, `parking_lot`, `portable-pty`, `portpicker`, and `prost`, while also reordering existing ones in `Cargo.toml` for better organization. Additionally, the Content Security Policy (CSP) settings in `tauri.conf.json` have been updated to allow connections and resource loading from `http://localhost:*` and `https://tauri.localhost`. These changes are aimed at enabling richer local development capabilities, particularly for features that require WebSocket connections, local resource access, and enhanced web view permissions during development.
1 parent 469a692 commit d2a8d76

2 files changed

Lines changed: 27 additions & 26 deletions

File tree

Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ Echo = { workspace = true }
3434
env_logger = { workspace = true }
3535
futures-util = { workspace = true, features = ["sink", "std"] }
3636
globset = { workspace = true }
37+
grep-regex = { workspace = true }
38+
grep-searcher = { workspace = true }
39+
http = { workspace = true }
3740
ignore = { workspace = true }
3841
keyring = { workspace = true }
42+
lazy_static = { workspace = true }
3943
log = { workspace = true }
4044
md5 = { workspace = true }
4145
num_cpus = { workspace = true }
4246
once_cell = { workspace = true }
47+
parking_lot = { workspace = true }
48+
portable-pty = { workspace = true }
49+
portpicker = { workspace = true }
50+
prost = { workspace = true }
4351
rand = { workspace = true }
4452
serde = { workspace = true }
4553
serde_json = { workspace = true }
@@ -48,16 +56,9 @@ tokio = { workspace = true, features = ["full"] }
4856
tokio-tungstenite = { workspace = true, features = ["rustls-tls-native-roots"] }
4957
toml = { workspace = true }
5058
tonic = { workspace = true }
59+
tonic-prost = { workspace = true }
5160
url = { workspace = true, features = ["serde"] }
5261
uuid = { workspace = true, features = ["v4", "serde"] }
53-
parking_lot = { workspace = true }
54-
lazy_static = { workspace = true }
55-
portable-pty = { workspace = true }
56-
prost = { workspace = true }
57-
http = { workspace = true }
58-
grep-regex = { workspace = true }
59-
grep-searcher = { workspace = true }
60-
tonic-prost = { workspace = true }
6162

6263
[features]
6364
default = ["ExtensionHostCocoon", "MistNative"]

tauri.conf.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@
1111
"capabilities": [],
1212
"csp": {
1313
"block-all-mixed-content": "",
14-
"connect-src": "'self' wss://tauri.localhost https:",
14+
"connect-src": "'self' http://localhost:* https://tauri.localhost wss://tauri.localhost https:",
1515
"default-src": "'none'",
16-
"font-src": "'self' vscode-remote-resource: vscode-managed-remote-resource:",
17-
"frame-src": "'self' vscode-webview:",
18-
"img-src": "'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: https:",
19-
"manifest-src": "'self'",
20-
"media-src": "'self'",
16+
"font-src": "'self' vscode-remote-resource: vscode-managed-remote-resource: http://localhost:* https://tauri.localhost",
17+
"frame-src": "'self' vscode-webview: http://localhost:* https://tauri.localhost",
18+
"img-src": "'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: http://localhost:* https://tauri.localhost https:",
19+
"manifest-src": "'self' http://localhost:* https://tauri.localhost",
20+
"media-src": "'self' http://localhost:* https://tauri.localhost",
2121
"require-trusted-types-for": "'script'",
22-
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' blob:",
23-
"style-src": "'self' 'unsafe-inline'",
24-
"trusted-types": "WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController",
22+
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' blob: http://localhost:* https://tauri.localhost",
23+
"style-src": "'self' 'unsafe-inline' http://localhost:* https://tauri.localhost",
24+
"trusted-types": "WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController richScreenReaderContent collapsedCellPreview",
2525
"upgrade-insecure-requests": ""
2626
},
2727
"dangerousDisableAssetCspModification": true,
2828
"devCsp": {
2929
"block-all-mixed-content": "",
30-
"connect-src": "'self' wss://tauri.localhost https:",
30+
"connect-src": "'self' http://localhost:* https://tauri.localhost wss://tauri.localhost https:",
3131
"default-src": "'none'",
32-
"font-src": "'self' vscode-remote-resource: vscode-managed-remote-resource:",
33-
"frame-src": "'self' vscode-webview:",
34-
"img-src": "'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: https:",
35-
"manifest-src": "'self'",
36-
"media-src": "'self'",
32+
"font-src": "'self' vscode-remote-resource: vscode-managed-remote-resource: http://localhost:* https://tauri.localhost",
33+
"frame-src": "'self' vscode-webview: http://localhost:* https://tauri.localhost",
34+
"img-src": "'self' data: blob: vscode-remote-resource: vscode-managed-remote-resource: http://localhost:* https://tauri.localhost https:",
35+
"manifest-src": "'self' http://localhost:* https://tauri.localhost",
36+
"media-src": "'self' http://localhost:* https://tauri.localhost",
3737
"require-trusted-types-for": "'script'",
38-
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' blob:",
39-
"style-src": "'self' 'unsafe-inline'",
40-
"trusted-types": "WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController",
38+
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' blob: http://localhost:* https://tauri.localhost",
39+
"style-src": "'self' 'unsafe-inline' http://localhost:* https://tauri.localhost",
40+
"trusted-types": "WorkerApplication amdLoader cellRendererEditorText defaultWorkerFactory diffEditorWidget diffReview domLineBreaksComputer dompurify editorGhostText editorViewLayer notebookRenderer stickyScrollViewLayer tokenizeToString notebookChatEditController richScreenReaderContent collapsedCellPreview",
4141
"upgrade-insecure-requests": ""
4242
},
4343
"freezePrototype": false,

0 commit comments

Comments
 (0)