boxpay-checkout-reactnative-sdk 1.0.0-beta32 → 1.0.0-beta34
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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// src/scripts/checkPeerDeps.js
|
|
4
|
+
const isInNodeModules = __dirname.includes("node_modules");
|
|
5
|
+
|
|
6
|
+
// Skip when running inside SDK repo itself
|
|
7
|
+
if (!isInNodeModules) {
|
|
8
|
+
console.log("🛑 Skipping peerDeps check in SDK development mode");
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
const {
|
|
12
|
+
execSync
|
|
13
|
+
} = require("child_process");
|
|
14
|
+
const pkg = require("../../package.json");
|
|
15
|
+
const peers = pkg.peerDependencies || {};
|
|
16
|
+
Object.entries(peers).forEach(([dep, version]) => {
|
|
17
|
+
try {
|
|
18
|
+
require.resolve(dep);
|
|
19
|
+
console.log(`✅ ${dep} already installed`);
|
|
20
|
+
} catch {
|
|
21
|
+
console.log(`📦 Installing missing peer dependency: ${dep}@${version}`);
|
|
22
|
+
execSync(`npm install ${dep}@${version}`, {
|
|
23
|
+
stdio: "inherit"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=checkPeerDeps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isInNodeModules","__dirname","includes","console","log","process","exit","execSync","require","pkg","peers","peerDependencies","Object","entries","forEach","dep","version","resolve","stdio"],"sourceRoot":"../../../src","sources":["scripts/checkPeerDeps.js"],"mappings":";;AAAA;AACA,MAAMA,eAAe,GAAGC,SAAS,CAACC,QAAQ,CAAC,cAAc,CAAC;;AAE1D;AACA,IAAI,CAACF,eAAe,EAAE;EACpBG,OAAO,CAACC,GAAG,CAAC,oDAAoD,CAAC;EACjEC,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;AACjB;AAEA,MAAM;EAAEC;AAAS,CAAC,GAAGC,OAAO,CAAC,eAAe,CAAC;AAC7C,MAAMC,GAAG,GAAGD,OAAO,CAAC,oBAAoB,CAAC;AAEzC,MAAME,KAAK,GAAGD,GAAG,CAACE,gBAAgB,IAAI,CAAC,CAAC;AAExCC,MAAM,CAACC,OAAO,CAACH,KAAK,CAAC,CAACI,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,OAAO,CAAC,KAAK;EAChD,IAAI;IACFR,OAAO,CAACS,OAAO,CAACF,GAAG,CAAC;IACpBZ,OAAO,CAACC,GAAG,CAAC,KAAKW,GAAG,oBAAoB,CAAC;EAC3C,CAAC,CAAC,MAAM;IACNZ,OAAO,CAACC,GAAG,CAAC,0CAA0CW,GAAG,IAAIC,OAAO,EAAE,CAAC;IACvET,QAAQ,CAAC,eAAeQ,GAAG,IAAIC,OAAO,EAAE,EAAE;MAAEE,KAAK,EAAE;IAAU,CAAC,CAAC;EACjE;AACF,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boxpay-checkout-reactnative-sdk",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-beta34",
|
|
4
4
|
"description": "Boxpay Payment Gateway",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"clean": "del-cli lib",
|
|
34
34
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
35
35
|
"prepare": "bob build && cp -r assets lib/assets",
|
|
36
|
-
"release": "release-it --only-version"
|
|
36
|
+
"release": "release-it --only-version",
|
|
37
|
+
"postinstall": "node src/scripts/checkPeerDeps.js"
|
|
37
38
|
},
|
|
38
39
|
"keywords": [
|
|
39
40
|
"react-native",
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"react-native-paper": ">=5.0.0",
|
|
80
81
|
"react-native-shimmer-placeholder": ">=2.0.0",
|
|
81
82
|
"react-native-toast-message": ">=2.0.0",
|
|
83
|
+
"react-native-device-info": "^14.0.4",
|
|
82
84
|
"react-native-webview": ">=13.0.0"
|
|
83
85
|
},
|
|
84
86
|
"packageManager": "yarn@3.6.1",
|
|
@@ -144,7 +146,6 @@
|
|
|
144
146
|
"currency-symbol-map": "^5.1.0",
|
|
145
147
|
"expo-font": "^13.3.2",
|
|
146
148
|
"lottie-react-native": "^7.3.4",
|
|
147
|
-
"react-native-device-info": "^14.0.4",
|
|
148
149
|
"react-native-modal": "^14.0.0-rc.1",
|
|
149
150
|
"react-native-svg": ">=15.0.0"
|
|
150
151
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/scripts/checkPeerDeps.js
|
|
2
|
+
const isInNodeModules = __dirname.includes("node_modules");
|
|
3
|
+
|
|
4
|
+
// Skip when running inside SDK repo itself
|
|
5
|
+
if (!isInNodeModules) {
|
|
6
|
+
console.log("🛑 Skipping peerDeps check in SDK development mode");
|
|
7
|
+
process.exit(0);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { execSync } = require("child_process");
|
|
11
|
+
const pkg = require("../../package.json");
|
|
12
|
+
|
|
13
|
+
const peers = pkg.peerDependencies || {};
|
|
14
|
+
|
|
15
|
+
Object.entries(peers).forEach(([dep, version]) => {
|
|
16
|
+
try {
|
|
17
|
+
require.resolve(dep);
|
|
18
|
+
console.log(`✅ ${dep} already installed`);
|
|
19
|
+
} catch {
|
|
20
|
+
console.log(`📦 Installing missing peer dependency: ${dep}@${version}`);
|
|
21
|
+
execSync(`npm install ${dep}@${version}`, { stdio: "inherit" });
|
|
22
|
+
}
|
|
23
|
+
});
|