vrtx-react-native 0.1.70 → 0.1.71
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/ios/VrtxAndroid.podspec
CHANGED
|
@@ -19,11 +19,15 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
|
|
20
20
|
s.dependency 'ExpoModulesCore'
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
spm_dependency(
|
|
23
|
+
s,
|
|
24
|
+
url: 'https://github.com/vrtx-fintech/vrtx-ios.git',
|
|
25
|
+
requirement: {
|
|
26
|
+
kind: 'exactVersion',
|
|
27
|
+
version: '0.0.15',
|
|
28
|
+
},
|
|
29
|
+
products: ['VRTX']
|
|
30
|
+
)
|
|
27
31
|
|
|
28
32
|
# Swift/Objective-C compatibility
|
|
29
33
|
s.pod_target_xcconfig = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vrtx-react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"description": "vrtx react-native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
|
@@ -40,8 +40,6 @@
|
|
|
40
40
|
"format": "oxfmt .",
|
|
41
41
|
"format:check": "oxfmt --check .",
|
|
42
42
|
"test": "expo-module test",
|
|
43
|
-
"fetch:ios": "node scripts/fetch-vrtx-ios.mjs",
|
|
44
|
-
"postinstall": "node scripts/fetch-vrtx-ios.mjs",
|
|
45
43
|
"prepare": "expo-module prepare",
|
|
46
44
|
"prepublishOnly": "expo-module prepublishOnly",
|
|
47
45
|
"expo-module": "expo-module",
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Downloads the VRTX iOS xcframework from the upstream release into
|
|
3
|
-
// ios/Frameworks/. Runs as a postinstall hook so the binary is in
|
|
4
|
-
// place before `pod install` runs (for both library consumers and
|
|
5
|
-
// local dev).
|
|
6
|
-
//
|
|
7
|
-
// Skips if the framework is already present (cached from a previous
|
|
8
|
-
// install or downloaded by a different mechanism), and skips entirely
|
|
9
|
-
// on non-Darwin platforms where the iOS build would never run anyway.
|
|
10
|
-
|
|
11
|
-
import { mkdir, rm, stat, writeFile } from 'node:fs/promises';
|
|
12
|
-
import { fileURLToPath } from 'node:url';
|
|
13
|
-
import { dirname, join } from 'node:path';
|
|
14
|
-
import { tmpdir } from 'node:os';
|
|
15
|
-
import { execFile } from 'node:child_process';
|
|
16
|
-
import { promisify } from 'node:util';
|
|
17
|
-
|
|
18
|
-
const execFileAsync = promisify(execFile);
|
|
19
|
-
|
|
20
|
-
const VRTX_IOS_VERSION = '0.0.15';
|
|
21
|
-
const RELEASE_URL = `https://github.com/vrtx-fintech/vrtx-ios/releases/download/${VRTX_IOS_VERSION}/VRTX.xcframework.zip`;
|
|
22
|
-
|
|
23
|
-
const repoRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
24
|
-
const frameworksDir = join(repoRoot, 'ios', 'Frameworks');
|
|
25
|
-
const targetFramework = join(frameworksDir, 'VRTX.xcframework');
|
|
26
|
-
|
|
27
|
-
async function exists(path) {
|
|
28
|
-
try {
|
|
29
|
-
await stat(path);
|
|
30
|
-
return true;
|
|
31
|
-
} catch {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async function main() {
|
|
37
|
-
if (process.platform !== 'darwin') {
|
|
38
|
-
console.log(
|
|
39
|
-
'[vrtx-ios] Non-Darwin platform, skipping iOS framework fetch.',
|
|
40
|
-
);
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (await exists(targetFramework)) {
|
|
45
|
-
console.log(
|
|
46
|
-
`[vrtx-ios] VRTX.xcframework ${VRTX_IOS_VERSION} already present, skipping.`,
|
|
47
|
-
);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
console.log(`[vrtx-ios] Downloading VRTX.xcframework ${VRTX_IOS_VERSION}...`);
|
|
52
|
-
await mkdir(frameworksDir, { recursive: true });
|
|
53
|
-
const tmpZip = join(tmpdir(), `vrtx-xcframework-${process.pid}.zip`);
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
const res = await fetch(RELEASE_URL, { redirect: 'follow' });
|
|
57
|
-
if (!res.ok) {
|
|
58
|
-
throw new Error(
|
|
59
|
-
`HTTP ${res.status} ${res.statusText} fetching ${RELEASE_URL}`,
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
const buf = Buffer.from(await res.arrayBuffer());
|
|
63
|
-
await writeFile(tmpZip, buf);
|
|
64
|
-
await execFileAsync('unzip', ['-q', tmpZip, '-d', frameworksDir]);
|
|
65
|
-
console.log(
|
|
66
|
-
`[vrtx-ios] Installed VRTX.xcframework ${VRTX_IOS_VERSION} to ${frameworksDir}`,
|
|
67
|
-
);
|
|
68
|
-
} finally {
|
|
69
|
-
await rm(tmpZip, { force: true });
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
main().catch((err) => {
|
|
74
|
-
console.error(`[vrtx-ios] Failed to fetch VRTX.xcframework: ${err.message}`);
|
|
75
|
-
process.exit(1);
|
|
76
|
-
});
|