Skip to content

Commit

Permalink
fix: rollback window.__ever variable & initialization event
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Komarov committed Dec 2, 2024
1 parent 64c0122 commit ac2e6f2
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 48 deletions.
2 changes: 1 addition & 1 deletion assets/main.js

Large diffs are not rendered by default.

93 changes: 57 additions & 36 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
url: "https://pub.dev"
source: hosted
version: "64.0.0"
version: "72.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.2"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
url: "https://pub.dev"
source: hosted
version: "6.2.0"
version: "6.7.0"
args:
dependency: transitive
description:
name: args
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
url: "https://pub.dev"
source: hosted
version: "2.5.0"
version: "2.6.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -94,26 +99,26 @@ packages:
dependency: transitive
description:
name: convert
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.dev"
source: hosted
version: "3.1.1"
version: "3.1.2"
coverage:
dependency: transitive
description:
name: coverage
sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e"
sha256: "4b03e11f6d5b8f6e5bb5e9f7889a56fe6c5cbe942da5378ea4d4d7f73ef9dfe5"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.11.0"
crypto:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.6"
diff_match_patch:
dependency: transitive
description:
Expand Down Expand Up @@ -160,10 +165,10 @@ packages:
dependency: "direct main"
description:
name: flutter_inappwebview
sha256: "93cfcca02bdda4b26cd700cf70d9ddba09d8348e3e8f2857638c23ed23a4fcb4"
sha256: "80092d13d3e29b6227e25b67973c67c7210bd5e35c4b747ca908e31eb71a46d5"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
version: "6.1.5"
flutter_inappwebview_android:
dependency: transitive
description:
Expand All @@ -176,10 +181,10 @@ packages:
dependency: transitive
description:
name: flutter_inappwebview_internal_annotations
sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8"
sha256: "787171d43f8af67864740b6f04166c13190aa74a1468a1f1f1e9ee5b90c359cd"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.2.0"
flutter_inappwebview_ios:
dependency: transitive
description:
Expand Down Expand Up @@ -216,10 +221,10 @@ packages:
dependency: transitive
description:
name: flutter_inappwebview_windows
sha256: "95ebc65aecfa63b2084c822aec6ba0545f0a0afaa3899f2c752ec96c09108db5"
sha256: "8b4d3a46078a2cdc636c4a3d10d10f2a16882f6be607962dbfff8874d1642055"
url: "https://pub.dev"
source: hosted
version: "0.5.0+2"
version: "0.6.0"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand All @@ -239,10 +244,10 @@ packages:
dependency: transitive
description:
name: frontend_server_client
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "4.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -297,10 +302,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.7.1"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -337,10 +342,18 @@ packages:
dependency: transitive
description:
name: logging
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
macros:
dependency: transitive
description:
name: macros
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev"
source: hosted
version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -369,10 +382,10 @@ packages:
dependency: transitive
description:
name: mime
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.dev"
source: hosted
version: "1.0.5"
version: "2.0.0"
mocktail:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -488,18 +501,18 @@ packages:
dependency: transitive
description:
name: shelf_static
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3
url: "https://pub.dev"
source: hosted
version: "1.1.2"
version: "1.1.3"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "2.0.1"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -509,10 +522,10 @@ packages:
dependency: transitive
description:
name: source_map_stack_trace
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
source_maps:
dependency: transitive
description:
Expand Down Expand Up @@ -597,10 +610,10 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.4.0"
vector_math:
dependency: transitive
description:
Expand Down Expand Up @@ -641,14 +654,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web_socket:
dependency: transitive
description:
name: web_socket
sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83"
url: "https://pub.dev"
source: hosted
version: "0.1.6"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "3.0.1"
webdriver:
dependency: transitive
description:
Expand Down
8 changes: 4 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
bloc: ^8.1.1
bloc: ^8.1.4
flutter:
sdk: flutter
flutter_bloc: ^8.1.2
flutter_inappwebview: 6.1.4
flutter_bloc: ^8.1.6
flutter_inappwebview: 6.1.5
flutter_localizations:
sdk: flutter
intl: ^0.19.0
nekoton_webview:
path: ../

dev_dependencies:
bloc_test: ^9.1.1
bloc_test: ^9.1.7
broxus_flutter_analysis:
git:
url: https://github.com/broxus/flutter_templates.git
Expand Down
4 changes: 4 additions & 0 deletions js/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export const initializeProvider = ({
export function setGlobalProvider(
providerInstance: NekotonInpageProvider
): void {
// TODO(komarov): remove this
;(window as Record<string, any>).__ever = providerInstance
window.dispatchEvent(new Event('ever#initialized'))

// TODO(komarov): make it configurable?
;(window as Record<string, any>).__sparx = providerInstance
;(window as Record<string, any>).isNativeEverApp = true
Expand Down
14 changes: 7 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_inappwebview: ^6.1.4
json_annotation: ^4.8.1
logging: ^1.1.1
flutter_inappwebview: ^6.1.5
json_annotation: ^4.9.0
logging: ^1.3.0

dev_dependencies:
broxus_flutter_analysis:
git:
url: https://github.com/broxus/flutter_templates.git
ref: broxus_flutter_analysis-v1.0.0
build_runner: ^2.3.3
build_runner: ^2.4.13
flutter_test:
sdk: flutter
json_serializable: ^6.6.2
melos: ^3.0.1
mocktail: ^1.0.0
json_serializable: ^6.9.0
melos: ^3.4.0
mocktail: ^1.0.4

flutter:
assets:
Expand Down

0 comments on commit ac2e6f2

Please sign in to comment.