@dynamic-labs/react-native-extension 4.89.0 → 4.90.0
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/index.cjs
CHANGED
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { createURL, getInitialURL, addEventListener, openURL } from 'expo-linkin
|
|
|
13
13
|
import { openAuthSessionAsync } from 'expo-web-browser';
|
|
14
14
|
import { createPasskey, PasskeyStamper } from '@turnkey/react-native-passkey-stamper';
|
|
15
15
|
|
|
16
|
-
var version = "4.
|
|
16
|
+
var version = "4.90.0";
|
|
17
17
|
|
|
18
18
|
function _extends() {
|
|
19
19
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/react-native-extension",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.90.0",
|
|
4
4
|
"main": "./index.cjs",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"@turnkey/react-native-passkey-stamper": "1.2.7",
|
|
19
19
|
"@react-native-documents/picker": "^11.0.0",
|
|
20
20
|
"react-native-fs": ">=2.20.0",
|
|
21
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
22
|
-
"@dynamic-labs/client": "4.
|
|
23
|
-
"@dynamic-labs/logger": "4.
|
|
24
|
-
"@dynamic-labs/message-transport": "4.
|
|
25
|
-
"@dynamic-labs/webview-messages": "4.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.90.0",
|
|
22
|
+
"@dynamic-labs/client": "4.90.0",
|
|
23
|
+
"@dynamic-labs/logger": "4.90.0",
|
|
24
|
+
"@dynamic-labs/message-transport": "4.90.0",
|
|
25
|
+
"@dynamic-labs/webview-messages": "4.90.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=18.0.0 <20.0.0",
|
|
@@ -32,5 +32,13 @@
|
|
|
32
32
|
"expo-web-browser": ">=12.0.0",
|
|
33
33
|
"expo-secure-store": ">=12.0.0",
|
|
34
34
|
"expo-modules-core": ">=2.0.0"
|
|
35
|
+
},
|
|
36
|
+
"codegenConfig": {
|
|
37
|
+
"name": "DynamicClientSpec",
|
|
38
|
+
"type": "modules",
|
|
39
|
+
"jsSrcsDir": "turboModules",
|
|
40
|
+
"android": {
|
|
41
|
+
"javaPackageName": "xyz.dynamic.client"
|
|
42
|
+
}
|
|
35
43
|
}
|
|
36
44
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// VENDORED from @dynamic-labs-sdk/client (src/turboModules/NativeDynamicWebView.ts).
|
|
2
|
+
// The OLD SDK pulls @dynamic-labs-sdk/client in transitively, and iOS React
|
|
3
|
+
// Native codegen only generates TurboModule specs for DIRECT app dependencies.
|
|
4
|
+
// react-native-extension is a direct dependency of old-SDK apps, so carrying the
|
|
5
|
+
// codegen spec here makes the consuming app generate DynamicClientSpec/*.h for
|
|
6
|
+
// the transitively-linked native module. Keep byte-identical to the source spec
|
|
7
|
+
// in @dynamic-labs-sdk/client — update there and re-copy, do not edit here.
|
|
8
|
+
//
|
|
9
|
+
// The `interface`, `default export`, and the `react-native` import are hard
|
|
10
|
+
// requirements of the codegen parser and intentionally deviate from the
|
|
11
|
+
// project's conventions. Codegen discovers specs by the `Native*` filename
|
|
12
|
+
// prefix, so this file cannot be renamed to `.native.ts`.
|
|
13
|
+
|
|
14
|
+
import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
15
|
+
import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
16
|
+
|
|
17
|
+
export interface Spec extends TurboModule {
|
|
18
|
+
addListener(eventName: string): void;
|
|
19
|
+
close(instanceId: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a WKWebView for the given instanceId and begins loading `url`.
|
|
22
|
+
*
|
|
23
|
+
* Resolves on `didCommit` — i.e. the first byte of a 2xx/3xx HTTP
|
|
24
|
+
* response has been received and content parsing has started. Page-ready
|
|
25
|
+
* (e.g. the hosted iframe's `iframe-ready-*` handshake) is a separate
|
|
26
|
+
* concern and must be observed by the caller via the message bus; this
|
|
27
|
+
* Promise does not wait for it.
|
|
28
|
+
*
|
|
29
|
+
* Rejects with a `code` of `webview_<reason>` where `<reason>` is one of:
|
|
30
|
+
* - `invalid_url` — URL string was not parseable
|
|
31
|
+
* - `no_host_view` — no foreground window to attach the WebView
|
|
32
|
+
* - `http_error` — response status was >= 400 (userInfo contains `DynamicWebViewStatusCode`)
|
|
33
|
+
* - `navigation_failed` — DNS, TLS, connection failure, or post-commit abort
|
|
34
|
+
* - `cancelled` — `close(instanceId)` was called while this open was pending
|
|
35
|
+
* - `instance_busy` — `open` was called for an instanceId that already has an active WebView
|
|
36
|
+
* - `content_process_terminated` — the WKWebView WebContent process died during load
|
|
37
|
+
* - `unsupported` — the device's Android System WebView is too old to support the secure bridge (Android only)
|
|
38
|
+
*
|
|
39
|
+
* rejection codes into typed `WebViewLoadFailedError` instances.
|
|
40
|
+
*/
|
|
41
|
+
open(instanceId: string, url: string): Promise<void>;
|
|
42
|
+
removeListeners(count: number): void;
|
|
43
|
+
sendMessage(instanceId: string, data: UnsafeObject): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// eslint-disable-next-line import/no-default-export
|
|
47
|
+
export default TurboModuleRegistry.get<Spec>('DynamicClientWebView');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// VENDORED from @dynamic-labs-sdk/client (src/turboModules/NativeKeychain.ts).
|
|
2
|
+
// See NativeDynamicWebView.ts in this directory for why the spec is carried here.
|
|
3
|
+
// Keep byte-identical to the source spec in @dynamic-labs-sdk/client.
|
|
4
|
+
//
|
|
5
|
+
// The `interface`, `default export`, and `react-native` import are hard
|
|
6
|
+
// requirements of the codegen parser and intentionally deviate from the
|
|
7
|
+
// project's conventions. Codegen discovers specs by the `Native*` filename
|
|
8
|
+
// prefix, so this file cannot be renamed to `.native.ts`.
|
|
9
|
+
|
|
10
|
+
import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
11
|
+
|
|
12
|
+
export interface Spec extends TurboModule {
|
|
13
|
+
deleteKey(key: string): Promise<void>;
|
|
14
|
+
generateKeyPair(key: string): Promise<{ publicKey: string }>;
|
|
15
|
+
getPublicKey(key: string): Promise<{ publicKey: string } | null>;
|
|
16
|
+
hasKey(key: string): Promise<boolean>;
|
|
17
|
+
isAvailable(): Promise<boolean>;
|
|
18
|
+
sign(key: string, payload: string): Promise<{ signature: string }>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line import/no-default-export
|
|
22
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('DynamicClientKeychain');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// VENDORED from @dynamic-labs-sdk/client (src/turboModules/NativeReactNativeManifest.ts).
|
|
2
|
+
// See NativeDynamicWebView.ts in this directory for why the spec is carried here.
|
|
3
|
+
// Keep byte-identical to the source spec in @dynamic-labs-sdk/client.
|
|
4
|
+
//
|
|
5
|
+
// Consumed by React Native codegen to emit the Android/iOS native interfaces.
|
|
6
|
+
// The filename must stay prefixed with `Native` — codegen's parser discovers
|
|
7
|
+
// spec files by that convention and will silently skip anything else. The
|
|
8
|
+
// `interface` keyword, the `default export`, and the locally-declared
|
|
9
|
+
// `ReactNativeManifest` type are hard requirements of the codegen parser:
|
|
10
|
+
// codegen parses this file statically and does NOT follow imported type
|
|
11
|
+
// aliases, so the return shape must be defined inline here.
|
|
12
|
+
|
|
13
|
+
import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
14
|
+
|
|
15
|
+
export type ReactNativeManifest = {
|
|
16
|
+
sdkVersion: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export interface Spec extends TurboModule {
|
|
20
|
+
getManifest(): ReactNativeManifest;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line import/no-default-export -- codegen requires a default export of the TurboModule spec
|
|
24
|
+
export default TurboModuleRegistry.get<Spec>('DynamicClientManifest');
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// VENDORED from @dynamic-labs-sdk/client (src/turboModules/NativeScreenshotProtection.ts).
|
|
2
|
+
// See NativeDynamicWebView.ts in this directory for why the spec is carried here.
|
|
3
|
+
// Keep byte-identical to the source spec in @dynamic-labs-sdk/client.
|
|
4
|
+
//
|
|
5
|
+
// The `interface`, `default export`, and the `react-native` import are hard
|
|
6
|
+
// requirements of the codegen parser and intentionally deviate from the
|
|
7
|
+
// project's conventions. Codegen discovers specs by the `Native*` filename
|
|
8
|
+
// prefix, so this file cannot be renamed to `.native.ts`.
|
|
9
|
+
|
|
10
|
+
import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
11
|
+
|
|
12
|
+
export interface Spec extends TurboModule {
|
|
13
|
+
/**
|
|
14
|
+
* Toggles window-level screenshot/screen-recording protection on the
|
|
15
|
+
* foreground window while a sensitive surface (e.g. the private-key export
|
|
16
|
+
* display) is visible.
|
|
17
|
+
*
|
|
18
|
+
* Android applies `FLAG_SECURE` on the current Activity window when `enabled`
|
|
19
|
+
* is `true` and clears it when `false` (only if it set the flag itself, so a
|
|
20
|
+
* host app's own `FLAG_SECURE` is never cleared). iOS reparents the key
|
|
21
|
+
* window under a `secureTextEntry` field's canvas so captures render blank.
|
|
22
|
+
* The protection is window-level and independent of any WebView, so it works
|
|
23
|
+
* regardless of how the protected UI is rendered.
|
|
24
|
+
*/
|
|
25
|
+
setEnabled(enabled: boolean): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line import/no-default-export
|
|
29
|
+
export default TurboModuleRegistry.get<Spec>('DynamicClientScreenshotProtection');
|