@reclaimprotocol/inapp-rn-sdk 0.9.3-alpha.3 → 0.9.3-alpha.4
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/expo-plugin/build/android/withReclaimAndroidManifest.js +10 -12
- package/expo-plugin/build/android/withReclaimProjectBuildGradle.js +13 -49
- package/expo-plugin/build/index.d.ts +2 -2
- package/expo-plugin/build/index.js +5 -4
- package/expo-plugin/src/index.ts +4 -2
- package/expo-plugin/tsconfig.json +3 -1
- package/lib/typescript/commonjs/expo-plugin/src/index.d.ts +2 -2
- package/lib/typescript/commonjs/expo-plugin/src/index.d.ts.map +1 -1
- package/lib/typescript/module/expo-plugin/src/index.d.ts +2 -2
- package/lib/typescript/module/expo-plugin/src/index.d.ts.map +1 -1
- package/package.json +2 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withReclaimAndroidManifest = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return (0, config_plugins_1.withAndroidManifest)(config,
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const withReclaimAndroidManifest = (config) => {
|
|
6
|
+
return (0, config_plugins_1.withAndroidManifest)(config, (config) => {
|
|
7
|
+
let androidManifest = config.modResults.manifest;
|
|
8
|
+
const cannotInstallMessage = 'cannot install reclaim inapp android sdk';
|
|
9
9
|
if (!androidManifest) {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error(`No AndroidManifest found, ${cannotInstallMessage}`);
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
let application = androidManifest.application[0];
|
|
13
13
|
// Add the tools to apply permission remove
|
|
14
14
|
// Let the consumer app apply the permission on their app. All permissions are optional for this Reclaim InApp SDK.
|
|
15
15
|
// androidManifest.$ = {
|
|
@@ -17,12 +17,10 @@ var withReclaimAndroidManifest = function (config) {
|
|
|
17
17
|
// 'xmlns:tools': 'http://schemas.android.com/tools',
|
|
18
18
|
// };
|
|
19
19
|
if (!application) {
|
|
20
|
-
throw new Error(
|
|
20
|
+
throw new Error(`No base application found, ${cannotInstallMessage}`);
|
|
21
21
|
}
|
|
22
|
-
application.activity = application.activity.filter(
|
|
23
|
-
|
|
24
|
-
'org.reclaimprotocol.inapp_sdk.ReclaimActivity';
|
|
25
|
-
});
|
|
22
|
+
application.activity = application.activity.filter((act) => act.$['android:name'] !=
|
|
23
|
+
'org.reclaimprotocol.inapp_sdk.ReclaimActivity');
|
|
26
24
|
application.activity.push({
|
|
27
25
|
$: {
|
|
28
26
|
'android:name': 'org.reclaimprotocol.inapp_sdk.ReclaimActivity',
|
|
@@ -1,54 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.withReclaimProjectBuildGradle = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return (0, config_plugins_1.withProjectBuildGradle)(config,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const withReclaimProjectBuildGradle = (config) => {
|
|
6
|
+
return (0, config_plugins_1.withProjectBuildGradle)(config, async (config) => {
|
|
7
|
+
const flutterStorageUrl = process.env.EXPO_PUBLIC_FLUTTER_STORAGE_BASE_URL || "https://storage.googleapis.com";
|
|
8
|
+
const reclaimStorageUrl = process.env.EXPO_PUBLIC_RECLAIM_STORAGE_BASE_URL || "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo";
|
|
9
|
+
if (!config.modResults.contents.match('reclaim-inapp-sdk')) {
|
|
10
|
+
config.modResults.contents = config.modResults.contents.replace(/mavenCentral\(\)/g, `
|
|
11
|
+
mavenCentral()
|
|
12
|
+
maven { url "${reclaimStorageUrl}" }
|
|
13
|
+
maven { url "${flutterStorageUrl}/download.flutter.io" }`);
|
|
14
|
+
}
|
|
15
|
+
return config;
|
|
16
|
+
});
|
|
53
17
|
};
|
|
54
18
|
exports.withReclaimProjectBuildGradle = withReclaimProjectBuildGradle;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: ConfigPlugin<void>;
|
|
3
|
+
export default _default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
|
+
const android_1 = require("./android");
|
|
5
|
+
const pkg = require('@reclaimprotocol/inapp-rn-sdk/package.json');
|
|
6
|
+
const withReclaimInAppSdk = (config) => {
|
|
6
7
|
return (0, config_plugins_1.withPlugins)(config, [
|
|
7
8
|
android_1.withReclaimAndroidManifest,
|
|
8
9
|
android_1.withReclaimProjectBuildGradle,
|
|
9
10
|
]);
|
|
10
11
|
};
|
|
11
|
-
exports.default = withReclaimInAppSdk;
|
|
12
|
+
exports.default = (0, config_plugins_1.createRunOncePlugin)(withReclaimInAppSdk, pkg.name, pkg.version);
|
package/expo-plugin/src/index.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type ConfigPlugin, withPlugins } from '@expo/config-plugins';
|
|
1
|
+
import { type ConfigPlugin, createRunOncePlugin, withPlugins } from '@expo/config-plugins';
|
|
2
2
|
import {
|
|
3
3
|
withReclaimAndroidManifest,
|
|
4
4
|
withReclaimProjectBuildGradle,
|
|
5
5
|
} from './android';
|
|
6
6
|
|
|
7
|
+
const pkg = require('@reclaimprotocol/inapp-rn-sdk/package.json');
|
|
8
|
+
|
|
7
9
|
const withReclaimInAppSdk: ConfigPlugin = (config) => {
|
|
8
10
|
return withPlugins(config, [
|
|
9
11
|
withReclaimAndroidManifest,
|
|
@@ -11,4 +13,4 @@ const withReclaimInAppSdk: ConfigPlugin = (config) => {
|
|
|
11
13
|
]);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
|
-
export default withReclaimInAppSdk;
|
|
16
|
+
export default createRunOncePlugin(withReclaimInAppSdk, pkg.name, pkg.version);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAoC,MAAM,sBAAsB,CAAC;;AAe3F,wBAA+E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../expo-plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAoC,MAAM,sBAAsB,CAAC;;AAe3F,wBAA+E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/inapp-rn-sdk",
|
|
3
|
-
"version": "0.9.3-alpha.
|
|
3
|
+
"version": "0.9.3-alpha.4",
|
|
4
4
|
"description": "Reclaim Protocol's InApp React Native SDK for ZK proof generations for requests with an in-app experience of web verification",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
+
"expo-module-scripts": "^4.1.7",
|
|
75
76
|
"@commitlint/config-conventional": "^17.0.2",
|
|
76
77
|
"@evilmartians/lefthook": "^1.5.0",
|
|
77
78
|
"@expo/config-plugins": "^9.0.14",
|