@dynamic-labs/legacy-react-native-extension 5.11.0 → 5.13.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 +1 -1
- package/index.js +1 -1
- package/package.json +6 -6
- package/turboModules/NativeICloudBackup.ts +45 -0
package/index.cjs
CHANGED
package/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { openAuthSessionAsync } from 'expo-web-browser';
|
|
|
14
14
|
import { resetGenericPassword, getGenericPassword, setGenericPassword } from 'react-native-keychain';
|
|
15
15
|
import { createPasskey, PasskeyStamper } from '@turnkey/react-native-passkey-stamper';
|
|
16
16
|
|
|
17
|
-
var version = "5.
|
|
17
|
+
var version = "5.13.0";
|
|
18
18
|
|
|
19
19
|
function _extends() {
|
|
20
20
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/legacy-react-native-extension",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.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": "5.
|
|
22
|
-
"@dynamic-labs/legacy-client": "5.
|
|
23
|
-
"@dynamic-labs/logger": "5.
|
|
24
|
-
"@dynamic-labs/message-transport": "5.
|
|
25
|
-
"@dynamic-labs/webview-messages": "5.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "5.13.0",
|
|
22
|
+
"@dynamic-labs/legacy-client": "5.13.0",
|
|
23
|
+
"@dynamic-labs/logger": "5.13.0",
|
|
24
|
+
"@dynamic-labs/message-transport": "5.13.0",
|
|
25
|
+
"@dynamic-labs/webview-messages": "5.13.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=18.0.0 <20.0.0",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// VENDORED from @dynamic-labs-sdk/client (src/turboModules/NativeICloudBackup.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
|
+
* Resolves whether a backup can start: the device's iCloud account is
|
|
15
|
+
* available to CloudKit (signed in, not restricted) and the app can reach the
|
|
16
|
+
* given container, for example because the container belongs to the app. It
|
|
17
|
+
* does not guarantee the save itself; `saveBackup` reports failures such as a
|
|
18
|
+
* full iCloud quota or a lost connection.
|
|
19
|
+
*
|
|
20
|
+
* Resolves `false` when the user is not signed in to iCloud, the one state
|
|
21
|
+
* they can fix by signing in. Every other reason a backup cannot start
|
|
22
|
+
* rejects with a code, so the real cause reaches the user: `icloud_restricted`,
|
|
23
|
+
* `icloud_unavailable`, `icloud_status_unknown`, `icloud_access_denied` (the
|
|
24
|
+
* app cannot use the container), `icloud_network_unavailable`,
|
|
25
|
+
* `icloud_access_check_failed` (the container check failed for another
|
|
26
|
+
* reason) or `icloud_not_entitled` (the iCloud capability is missing from the
|
|
27
|
+
* app).
|
|
28
|
+
*
|
|
29
|
+
* Android has no iCloud, so it always resolves `false`.
|
|
30
|
+
*/
|
|
31
|
+
isAuthenticated(containerIdentifier: string): Promise<boolean>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Saves an already-encrypted backup, serialized as JSON, to the user's
|
|
35
|
+
* private CloudKit database in the given container.
|
|
36
|
+
*
|
|
37
|
+
* iOS writes a `Backup` record with the JSON in its `backupData` field, the
|
|
38
|
+
* same shape the web flow writes, so either can read the other's backups.
|
|
39
|
+
* Android has no iCloud, so it always rejects with `icloud_unsupported`.
|
|
40
|
+
*/
|
|
41
|
+
saveBackup(containerIdentifier: string, backupJson: string): Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line import/no-default-export -- codegen requires a default export of the TurboModule spec
|
|
45
|
+
export default TurboModuleRegistry.get<Spec>('DynamicClientICloudBackup');
|