Skip to content

Commit d3d258a

Browse files
committed
Fix downloading worker
1 parent 4adfbc1 commit d3d258a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

packages/powersync_core/lib/src/database/powersync_database_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export 'powersync_database_impl_stub.dart'
66
// ignore: uri_does_not_exist
77
if (dart.library.io) './native/native_powersync_database.dart'
88
// ignore: uri_does_not_exist
9-
if (dart.library.html) './web/web_powersync_database.dart';
9+
if (dart.library.js_interop) './web/web_powersync_database.dart';

packages/powersync_core/lib/src/open_factory.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export 'open_factory/open_factory_stub.dart'
66
// ignore: uri_does_not_exist
77
if (dart.library.io) 'open_factory/native/native_open_factory.dart'
88
// ignore: uri_does_not_exist
9-
if (dart.library.html) 'open_factory/web/web_open_factory.dart';
9+
if (dart.library.js_interop) 'open_factory/web/web_open_factory.dart';

packages/powersync_core/lib/src/setup_web.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Future<void> downloadWebAssets(List<String> arguments,
2323
final root = Directory.current.uri;
2424
print('Project root: ${root.toFilePath()}');
2525

26-
final wasmPath = '${root.toFilePath()}$outputDir/sqlite3.wasm';
26+
final wasmFileName = encryption ? 'sqlite3mc.wasm' : 'sqlite3.wasm';
27+
final wasmPath = '${root.toFilePath()}$outputDir/$wasmFileName';
2728

2829
final workerPath = '${root.toFilePath()}$outputDir/powersync_db.worker.js';
2930
final syncWorkerPath =
@@ -86,9 +87,8 @@ Future<void> downloadWebAssets(List<String> arguments,
8687
You can view the full list of releases at https://github.com/powersync-ja/sqlite3.dart/releases""");
8788
}
8889

89-
final filename = encryption ? 'sqlite3mc.wasm' : 'sqlite3.wasm';
9090
final sqliteUrl =
91-
'https://github.com/powersync-ja/sqlite3.dart/releases/download/$sqlite3Version/$filename';
91+
'https://github.com/powersync-ja/sqlite3.dart/releases/download/$sqlite3Version/$wasmFileName';
9292

9393
await downloadFile(httpClient, sqliteUrl, wasmPath);
9494
} catch (e) {

packages/powersync_core/lib/src/user_agent/user_agent.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export './user_agent_stub.dart'
22
// ignore: uri_does_not_exist
33
if (dart.library.io) './user_agent_native.dart'
44
// ignore: uri_does_not_exist
5-
if (dart.library.html) './user_agent_web.dart';
5+
if (dart.library.js_interop) './user_agent_web.dart';

packages/powersync_core/test/utils/test_utils_impl.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export 'stub_test_utils.dart'
22
// ignore: uri_does_not_exist
33
if (dart.library.io) 'native_test_utils.dart'
44
// ignore: uri_does_not_exist
5-
if (dart.library.html) 'web_test_utils.dart';
5+
if (dart.library.js_interop) 'web_test_utils.dart';

0 commit comments

Comments
 (0)