sparkbun 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-linux-arm64/libNativeWrapper.so +0 -0
- package/dist-linux-arm64/{libElectrobunCore.so → libSparkBunCore.so} +0 -0
- package/dist-linux-x64/libNativeWrapper.so +0 -0
- package/dist-linux-x64/{libElectrobunCore.so → libSparkBunCore.so} +0 -0
- package/dist-macos-arm64/libNativeWrapper.dylib +0 -0
- package/dist-macos-arm64/libSparkBunCore.dylib +0 -0
- package/dist-macos-x64/libNativeWrapper.dylib +0 -0
- package/dist-macos-x64/libSparkBunCore.dylib +0 -0
- package/dist-macos-x64/libasar.dylib +0 -0
- package/dist-macos-x64/libwebgpu_dawn.dylib +0 -0
- package/dist-macos-x64/process_helper +0 -0
- package/dist-win-arm64/SparkBunCore.dll +0 -0
- package/dist-win-arm64/WebView2Loader.dll +0 -0
- package/dist-win-arm64/libNativeWrapper.dll +0 -0
- package/dist-win-arm64/zig-asar/arm64/libasar.dll +0 -0
- package/dist-win-arm64/zig-asar/x64/libasar.dll +0 -0
- package/dist-win-x64/SparkBunCore.dll +0 -0
- package/package.json +1 -1
- package/scripts/setup-win-arm64.ps1 +19 -0
- package/src/browser/global.d.ts +11 -11
- package/src/browser/index.ts +10 -10
- package/src/bun/core/BrowserView.ts +2 -2
- package/src/bun/core/Updater.ts +6 -56
- package/src/bun/preload/.generated/compiled.ts +2 -2
- package/src/bun/preload/dragRegions.ts +2 -2
- package/src/bun/preload/encryption.ts +4 -4
- package/src/bun/preload/events.ts +4 -4
- package/src/bun/preload/globals.d.ts +14 -14
- package/src/bun/preload/index-sandboxed.ts +3 -3
- package/src/bun/preload/index.ts +19 -19
- package/src/bun/preload/internalRpc.ts +3 -3
- package/src/bun/preload/webviewTag.ts +2 -2
- package/src/bun/preload/wgpuTag.ts +1 -1
- package/src/bun/proc/native.ts +6 -6
- package/src/cli/index.ts +47 -83
- package/src/core/build.zig +1 -1
- package/src/core/main.zig +25 -24
- package/src/installer/installer-template.ts +1 -1
- package/src/launcher/main.ts +10 -10
- package/src/native/linux/cef_process_helper_linux.cpp +4 -4
- package/src/native/linux/nativeWrapper.cpp +230 -230
- package/src/native/macos/cef_process_helper_mac.cc +4 -4
- package/src/native/macos/nativeWrapper.mm +100 -100
- package/src/native/shared/accelerator_parser.h +5 -5
- package/src/native/shared/app_paths.h +7 -7
- package/src/native/shared/asar.h +5 -5
- package/src/native/shared/cache_migration.h +14 -14
- package/src/native/shared/callbacks.h +5 -5
- package/src/native/shared/cef_response_filter.h +18 -18
- package/src/native/shared/chromium_flags.h +6 -6
- package/src/native/shared/config.h +5 -5
- package/src/native/shared/download_event.h +5 -5
- package/src/native/shared/ffi_helpers.h +6 -6
- package/src/native/shared/glob_match.h +5 -5
- package/src/native/shared/json_menu_parser.h +5 -5
- package/src/native/shared/mime_types.h +5 -5
- package/src/native/shared/navigation_rules.h +5 -5
- package/src/native/shared/partition_context.h +5 -5
- package/src/native/shared/permissions.h +5 -5
- package/src/native/shared/permissions_cef.h +5 -5
- package/src/native/shared/preload_script.h +5 -5
- package/src/native/shared/shutdown_guard.h +5 -5
- package/src/native/shared/thread_safe_map.h +5 -5
- package/src/native/shared/webview_storage.h +5 -5
- package/src/native/win/cef_process_helper_win.cpp +4 -4
- package/src/native/win/dcomp_compositor.h +1 -1
- package/src/native/win/nativeWrapper.cpp +288 -288
- package/src/shared/bsdiff.ts +236 -0
- package/src/shared/bspatch.ts +98 -0
- package/dist-linux-arm64/bsdiff +0 -0
- package/dist-linux-arm64/bspatch +0 -0
- package/dist-linux-x64/bsdiff +0 -0
- package/dist-linux-x64/bspatch +0 -0
- package/dist-macos-arm64/bsdiff +0 -0
- package/dist-macos-arm64/bspatch +0 -0
- package/dist-macos-arm64/libElectrobunCore.dylib +0 -0
- package/dist-macos-arm64/preload-full.js +0 -885
- package/dist-macos-arm64/preload-sandboxed.js +0 -111
- package/dist-win-x64/ElectrobunCore.dll +0 -0
- package/dist-win-x64/bsdiff.exe +0 -0
- package/dist-win-x64/bspatch.exe +0 -0
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
//
|
|
5
5
|
// This is a header-only implementation to avoid build complexity.
|
|
6
6
|
|
|
7
|
-
#ifndef
|
|
8
|
-
#define
|
|
7
|
+
#ifndef SPARKBUN_SHUTDOWN_GUARD_H
|
|
8
|
+
#define SPARKBUN_SHUTDOWN_GUARD_H
|
|
9
9
|
|
|
10
10
|
#include <atomic>
|
|
11
11
|
#include <mutex>
|
|
12
12
|
#include <thread>
|
|
13
13
|
#include <chrono>
|
|
14
14
|
|
|
15
|
-
namespace
|
|
15
|
+
namespace sparkbun {
|
|
16
16
|
|
|
17
17
|
// Singleton for managing global shutdown state
|
|
18
18
|
// Allows code to check if shutdown is in progress and avoid race conditions
|
|
@@ -129,6 +129,6 @@ inline void initiateShutdown() {
|
|
|
129
129
|
ShutdownManager::getInstance().initiateShutdown();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
} // namespace
|
|
132
|
+
} // namespace sparkbun
|
|
133
133
|
|
|
134
|
-
#endif //
|
|
134
|
+
#endif // SPARKBUN_SHUTDOWN_GUARD_H
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
//
|
|
5
5
|
// This is a header-only implementation to avoid build complexity.
|
|
6
6
|
|
|
7
|
-
#ifndef
|
|
8
|
-
#define
|
|
7
|
+
#ifndef SPARKBUN_THREAD_SAFE_MAP_H
|
|
8
|
+
#define SPARKBUN_THREAD_SAFE_MAP_H
|
|
9
9
|
|
|
10
10
|
#include <map>
|
|
11
11
|
#include <mutex>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#include <optional>
|
|
14
14
|
#include <vector>
|
|
15
15
|
|
|
16
|
-
namespace
|
|
16
|
+
namespace sparkbun {
|
|
17
17
|
|
|
18
18
|
// Thread-safe wrapper around std::map
|
|
19
19
|
// Provides synchronized access to key-value storage
|
|
@@ -133,6 +133,6 @@ private:
|
|
|
133
133
|
std::map<KeyType, ValueType> map_;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
} // namespace
|
|
136
|
+
} // namespace sparkbun
|
|
137
137
|
|
|
138
|
-
#endif //
|
|
138
|
+
#endif // SPARKBUN_THREAD_SAFE_MAP_H
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
//
|
|
5
5
|
// This is a header-only implementation to avoid build complexity.
|
|
6
6
|
|
|
7
|
-
#ifndef
|
|
8
|
-
#define
|
|
7
|
+
#ifndef SPARKBUN_WEBVIEW_STORAGE_H
|
|
8
|
+
#define SPARKBUN_WEBVIEW_STORAGE_H
|
|
9
9
|
|
|
10
10
|
#include <string>
|
|
11
11
|
#include <map>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#include <cstdint>
|
|
14
14
|
#include <cstring>
|
|
15
15
|
|
|
16
|
-
namespace
|
|
16
|
+
namespace sparkbun {
|
|
17
17
|
|
|
18
18
|
// Thread-safe storage for webview HTML content
|
|
19
19
|
// Replaces the duplicated webviewHTMLContent maps across platforms
|
|
@@ -86,6 +86,6 @@ inline const char* getWebviewHTMLContentShared(uint32_t webviewId) {
|
|
|
86
86
|
return WebviewContentStorage::getInstance().getContentForFFI(webviewId);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
} // namespace
|
|
89
|
+
} // namespace sparkbun
|
|
90
90
|
|
|
91
|
-
#endif //
|
|
91
|
+
#endif // SPARKBUN_WEBVIEW_STORAGE_H
|
|
@@ -60,7 +60,7 @@ public:
|
|
|
60
60
|
CefRefPtr<CefV8Value> eventBridge = CefV8Value::CreateObject(nullptr, nullptr);
|
|
61
61
|
CefRefPtr<CefV8Value> eventPostMessage = CreatePostMessageFunction(browser, "EventBridgeMessage");
|
|
62
62
|
eventBridge->SetValue("postMessage", eventPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
63
|
-
window->SetValue("
|
|
63
|
+
window->SetValue("__sparkbunEventBridge", eventBridge, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
64
64
|
|
|
65
65
|
// Only create hostBridge/bunBridge aliases and internalBridge for non-sandboxed webviews
|
|
66
66
|
if (!is_sandboxed) {
|
|
@@ -68,14 +68,14 @@ public:
|
|
|
68
68
|
CefRefPtr<CefV8Value> bunBridge = CefV8Value::CreateObject(nullptr, nullptr);
|
|
69
69
|
CefRefPtr<CefV8Value> bunPostMessage = CreatePostMessageFunction(browser, "BunBridgeMessage");
|
|
70
70
|
bunBridge->SetValue("postMessage", bunPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
71
|
-
window->SetValue("
|
|
72
|
-
window->SetValue("
|
|
71
|
+
window->SetValue("__sparkbunHostBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
72
|
+
window->SetValue("__sparkbunBunBridge", bunBridge, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
73
73
|
|
|
74
74
|
// Create internalBridge - internal RPC bridge
|
|
75
75
|
CefRefPtr<CefV8Value> internalBridge = CefV8Value::CreateObject(nullptr, nullptr);
|
|
76
76
|
CefRefPtr<CefV8Value> internalPostMessage = CreatePostMessageFunction(browser, "internalMessage");
|
|
77
77
|
internalBridge->SetValue("postMessage", internalPostMessage, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
78
|
-
window->SetValue("
|
|
78
|
+
window->SetValue("__sparkbunInternalBridge", internalBridge, V8_PROPERTY_ATTRIBUTE_NONE);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
v8Context->Exit();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// dcomp_compositor.h — DirectComposition GPU surface compositor for Windows
|
|
2
2
|
//
|
|
3
3
|
// Provides zero-copy GPU compositing using DirectComposition + DXGI swap chain.
|
|
4
|
-
// This matches the macOS CAMetalLayer compositing pattern used in
|
|
4
|
+
// This matches the macOS CAMetalLayer compositing pattern used in SparkBun
|
|
5
5
|
// for native GPU rendering.
|
|
6
6
|
//
|
|
7
7
|
// Usage: initMinimal() to create DComp visual tree, then initSwapChainFromDevice()
|