peachsim 0.1.2436 → 0.1.2438
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/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +43886 -43752
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +22235 -22104
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +23141 -23007
- package/dist-lib/host/fetch-proxy-handler.cjs +2534 -2468
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +3403 -3337
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +4405 -4339
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +271 -263
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +34229 -34095
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1460 -1394
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/expo-native-workspace.ts +22 -10
- package/src/nitro-compile.ts +4 -5
- package/src/pod-prepare-toolchain.ts +112 -0
- package/src/pod-sources.ts +16 -4
- package/src/podfile-cocoapods.ts +3 -2
- package/src/pods-install.ts +2 -1
- package/src/podspec-ruby-stdlib.ts +8 -0
- package/src/swift-installed-targets.ts +3 -1
- package/src/swift-source-pods.ts +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2438 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -89,7 +89,7 @@ export interface BackgroundLength {
|
|
|
89
89
|
value: number;
|
|
90
90
|
unit: 'px' | 'pct';
|
|
91
91
|
}
|
|
92
|
-
type GradientInterpolation = 'oklab' | 'unpremultiplied';
|
|
92
|
+
type GradientInterpolation = 'oklab' | 'swiftui-perceptual' | 'unpremultiplied';
|
|
93
93
|
type GradientShape = {
|
|
94
94
|
type: 'linear';
|
|
95
95
|
colors: string[];
|
package/package.json
CHANGED
|
@@ -837,8 +837,13 @@ export async function prepareInstalledExpoWorkspace(app: string, work: string) {
|
|
|
837
837
|
)
|
|
838
838
|
const execute: NativeExecute = (args, cwd, env = {}) =>
|
|
839
839
|
runAdmitted(lease, args[0]!, args.slice(1), cwd, env)
|
|
840
|
-
await prepareNativeProject(
|
|
841
|
-
|
|
840
|
+
await prepareNativeProject(
|
|
841
|
+
preparedApp,
|
|
842
|
+
work,
|
|
843
|
+
manifest,
|
|
844
|
+
'workspace',
|
|
845
|
+
execute,
|
|
846
|
+
(message) => console.error(`[expo-native-workspace] ${message}`),
|
|
842
847
|
)
|
|
843
848
|
fs.writeFileSync(path.join(work, '.peach-complete'), 'complete\n')
|
|
844
849
|
const ios = path.join(preparedApp, 'ios')
|
|
@@ -1079,6 +1084,7 @@ async function prepareWorkspace(
|
|
|
1079
1084
|
if (!projectReady) {
|
|
1080
1085
|
await prepareNativeProject(
|
|
1081
1086
|
preparedApp,
|
|
1087
|
+
work,
|
|
1082
1088
|
appManifest,
|
|
1083
1089
|
'project',
|
|
1084
1090
|
execute,
|
|
@@ -1090,6 +1096,7 @@ async function prepareWorkspace(
|
|
|
1090
1096
|
if (stage === 'workspace' && !fs.existsSync(marker)) {
|
|
1091
1097
|
await prepareNativeProject(
|
|
1092
1098
|
preparedApp,
|
|
1099
|
+
work,
|
|
1093
1100
|
appManifest,
|
|
1094
1101
|
'workspace',
|
|
1095
1102
|
execute,
|
|
@@ -1133,6 +1140,7 @@ export function declaresNativeDependency(manifest: NativeProjectManifest, name:
|
|
|
1133
1140
|
|
|
1134
1141
|
async function prepareNativeProject(
|
|
1135
1142
|
app: string,
|
|
1143
|
+
workspace: string,
|
|
1136
1144
|
manifest: NativeProjectManifest,
|
|
1137
1145
|
stage: 'project' | 'workspace',
|
|
1138
1146
|
execute: NativeExecute,
|
|
@@ -1180,14 +1188,18 @@ async function prepareNativeProject(
|
|
|
1180
1188
|
// is installed, but autolinking links it only into apps that declare it.
|
|
1181
1189
|
stageCachedQuickCryptoOpenSsl(app)
|
|
1182
1190
|
report('installing pods')
|
|
1183
|
-
const { timings } = await installPods(
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
+
const { timings } = await installPods(
|
|
1192
|
+
app,
|
|
1193
|
+
{
|
|
1194
|
+
...cleanWorkspaceGitEnv(),
|
|
1195
|
+
EXPO_NO_TELEMETRY: '1',
|
|
1196
|
+
LANG: 'en_US.UTF-8',
|
|
1197
|
+
LC_ALL: 'en_US.UTF-8',
|
|
1198
|
+
...sourcePodEnv,
|
|
1199
|
+
...(declares('react-native-webgpu') ? {} : { RNSKIA_VENDOR_DAWN: '1' }),
|
|
1200
|
+
},
|
|
1201
|
+
workspace,
|
|
1202
|
+
)
|
|
1191
1203
|
report(`pods installed ${JSON.stringify(timings)}`)
|
|
1192
1204
|
}
|
|
1193
1205
|
|
package/src/nitro-compile.ts
CHANGED
|
@@ -303,9 +303,6 @@ export function collectNitroCompileInput(
|
|
|
303
303
|
],
|
|
304
304
|
})
|
|
305
305
|
: nativeSettings
|
|
306
|
-
const interoperability = target.cxxInterop
|
|
307
|
-
? settings.replace(/\]$/, ', .interoperabilityMode(.Cxx)]')
|
|
308
|
-
: settings
|
|
309
306
|
const exclude = target.exclude?.length
|
|
310
307
|
? `, exclude: ${JSON.stringify(target.exclude)}`
|
|
311
308
|
: ''
|
|
@@ -313,7 +310,7 @@ export function collectNitroCompileInput(
|
|
|
313
310
|
target.publicHeadersPath === undefined
|
|
314
311
|
? ''
|
|
315
312
|
: `, publicHeadersPath: ${JSON.stringify(target.publicHeadersPath)}`
|
|
316
|
-
return `.target(name: ${JSON.stringify(target.name)}, dependencies: ${JSON.stringify(uniqueDeps)}, path: ${JSON.stringify(target.path)}${exclude}${headers}, ${
|
|
313
|
+
return `.target(name: ${JSON.stringify(target.name)}, dependencies: ${JSON.stringify(uniqueDeps)}, path: ${JSON.stringify(target.path)}${exclude}${headers}, ${settings}),`
|
|
317
314
|
}),
|
|
318
315
|
`.executableTarget(name: "PeachNitroApp", dependencies: ${JSON.stringify(executableDependencies)}, swiftSettings: [.interoperabilityMode(.Cxx)]),`,
|
|
319
316
|
'], cxxLanguageStandard: .cxx20)',
|
|
@@ -709,7 +706,9 @@ export async function prepareNitroCompileInput(
|
|
|
709
706
|
},
|
|
710
707
|
async (root) => {
|
|
711
708
|
const snapshot = await installedWorkspaceInput(root, 'main.swift')
|
|
712
|
-
installedTargets = swiftManifestTargets(
|
|
709
|
+
installedTargets = swiftManifestTargets(
|
|
710
|
+
snapshot.input.files['Package.swift']!,
|
|
711
|
+
).filter((target) => !target.executable)
|
|
713
712
|
// react's registration and turbomodule implementations belong to its
|
|
714
713
|
// runtime, while this executable owns the selected Nitro providers.
|
|
715
714
|
const swiftFiles = Object.keys(snapshot.input.files).filter((file) =>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { cacheDir } from './home-paths'
|
|
5
|
+
import { swiftSdkPaths } from './swift-compile'
|
|
6
|
+
import { resolveSwiftModule } from './swift-distribution'
|
|
7
|
+
import { NATIVE_GRAPH_SDK_VERSION, WASI_EMULATION_FLAGS } from './swift-objc-standin'
|
|
8
|
+
import { swiftEnvironment } from './swift-toolchain'
|
|
9
|
+
|
|
10
|
+
const XCRUN = `#!/bin/bash
|
|
11
|
+
set -eu
|
|
12
|
+
sdk=macosx
|
|
13
|
+
find_tool=false
|
|
14
|
+
while (( $# )); do
|
|
15
|
+
case "$1" in
|
|
16
|
+
-sdk|--sdk) sdk="$2"; shift 2 ;;
|
|
17
|
+
-find|--find|-f) find_tool=true; shift ;;
|
|
18
|
+
*) break ;;
|
|
19
|
+
esac
|
|
20
|
+
done
|
|
21
|
+
case "$sdk" in
|
|
22
|
+
iphoneos|iphonesimulator|appletvos|appletvsimulator|macosx) ;;
|
|
23
|
+
*) echo "xcrun: unsupported SDK $sdk" >&2; exit 1 ;;
|
|
24
|
+
esac
|
|
25
|
+
case "$1" in
|
|
26
|
+
--show-sdk-path) printf '%s\\n' "$PEACH_POD_SYSROOT"; exit ;;
|
|
27
|
+
--show-sdk-version) printf '%s\\n' '${NATIVE_GRAPH_SDK_VERSION}'; exit ;;
|
|
28
|
+
cc|clang) tool="\${0%/*}/$sdk/clang" ;;
|
|
29
|
+
c++|clang++) tool="\${0%/*}/$sdk/clang++" ;;
|
|
30
|
+
ld) tool="$PEACH_POD_COMPILER/ld64.lld" ;;
|
|
31
|
+
*) echo "xcrun: unsupported tool $1" >&2; exit 1 ;;
|
|
32
|
+
esac
|
|
33
|
+
shift
|
|
34
|
+
if $find_tool; then printf '%s\\n' "$tool"; else exec "$tool" "$@"; fi
|
|
35
|
+
`
|
|
36
|
+
|
|
37
|
+
// swift's lld accepts freestanding Mach-O objects without a platform load
|
|
38
|
+
// command. the driver still stamps the linked dylib with the macOS target.
|
|
39
|
+
const CLANG = `#!/bin/bash
|
|
40
|
+
set -eu
|
|
41
|
+
directory="\${0%/*}"
|
|
42
|
+
compiler="$PEACH_POD_COMPILER/\${0##*/}"
|
|
43
|
+
if [[ "$directory" == "$PEACH_POD_TOOLS" ]]; then
|
|
44
|
+
for argument; do
|
|
45
|
+
if [[ "$argument" == -dynamiclib ]]; then
|
|
46
|
+
exec "$directory/macosx/\${0##*/}" "$@"
|
|
47
|
+
fi
|
|
48
|
+
done
|
|
49
|
+
exec "$compiler" "$@"
|
|
50
|
+
fi
|
|
51
|
+
if [[ "$directory" == */macosx ]]; then
|
|
52
|
+
exec "$compiler" --target=arm64-apple-macos11 -fuse-ld=lld -nostdlib \\
|
|
53
|
+
-Xclang -triple -Xclang arm64-apple-darwin "$@"
|
|
54
|
+
fi
|
|
55
|
+
args=()
|
|
56
|
+
while (( $# )); do
|
|
57
|
+
case "$1" in
|
|
58
|
+
-arch|-isysroot) shift 2 ;;
|
|
59
|
+
*) args+=("$1"); shift ;;
|
|
60
|
+
esac
|
|
61
|
+
done
|
|
62
|
+
exec "$compiler" --target=wasm64-unknown-wasip1 --sysroot="$PEACH_POD_SYSROOT" \\
|
|
63
|
+
-resource-dir "$PEACH_POD_RESOURCES/clang" ${WASI_EMULATION_FLAGS.join(' ')} "\${args[@]}"
|
|
64
|
+
`
|
|
65
|
+
|
|
66
|
+
export async function podPrepareEnvironment(
|
|
67
|
+
base: NodeJS.ProcessEnv,
|
|
68
|
+
): Promise<NodeJS.ProcessEnv> {
|
|
69
|
+
if (process.platform !== 'linux') return base
|
|
70
|
+
const { root, toolchainBin } = await resolveSwiftModule()
|
|
71
|
+
const { sysroot, resources } = swiftSdkPaths(root, toolchainBin)
|
|
72
|
+
const key = createHash('sha256').update(XCRUN).update(CLANG).digest('hex').slice(0, 16)
|
|
73
|
+
const directory = path.join(cacheDir(), 'pod-tools', key)
|
|
74
|
+
if (!fs.existsSync(directory)) {
|
|
75
|
+
fs.mkdirSync(path.dirname(directory), { recursive: true })
|
|
76
|
+
const staged = fs.mkdtempSync(`${directory}-`)
|
|
77
|
+
try {
|
|
78
|
+
fs.writeFileSync(path.join(staged, 'xcrun'), XCRUN, { mode: 0o755 })
|
|
79
|
+
for (const clang of ['clang', 'clang++'])
|
|
80
|
+
fs.writeFileSync(path.join(staged, clang), CLANG, { mode: 0o755 })
|
|
81
|
+
for (const sdk of [
|
|
82
|
+
'iphoneos',
|
|
83
|
+
'iphonesimulator',
|
|
84
|
+
'appletvos',
|
|
85
|
+
'appletvsimulator',
|
|
86
|
+
'macosx',
|
|
87
|
+
]) {
|
|
88
|
+
const tools = path.join(staged, sdk)
|
|
89
|
+
fs.mkdirSync(tools)
|
|
90
|
+
for (const clang of ['clang', 'clang++'])
|
|
91
|
+
fs.writeFileSync(path.join(tools, clang), CLANG, { mode: 0o755 })
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
fs.renameSync(staged, directory)
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (!fs.existsSync(directory)) throw error
|
|
97
|
+
}
|
|
98
|
+
} finally {
|
|
99
|
+
fs.rmSync(staged, { recursive: true, force: true })
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const { LD_LIBRARY_PATH } = swiftEnvironment(base)
|
|
103
|
+
return {
|
|
104
|
+
...base,
|
|
105
|
+
LD_LIBRARY_PATH,
|
|
106
|
+
PATH: [directory, base.PATH].filter(Boolean).join(path.delimiter),
|
|
107
|
+
PEACH_POD_TOOLS: directory,
|
|
108
|
+
PEACH_POD_COMPILER: toolchainBin,
|
|
109
|
+
PEACH_POD_SYSROOT: sysroot,
|
|
110
|
+
PEACH_POD_RESOURCES: resources,
|
|
111
|
+
}
|
|
112
|
+
}
|
package/src/pod-sources.ts
CHANGED
|
@@ -8,6 +8,7 @@ import fs from 'node:fs'
|
|
|
8
8
|
import os from 'node:os'
|
|
9
9
|
import path from 'node:path'
|
|
10
10
|
import { rnxHomeDir } from './home-paths'
|
|
11
|
+
import { podPrepareEnvironment } from './pod-prepare-toolchain'
|
|
11
12
|
|
|
12
13
|
const COCOAPODS_VERSION = '1.17.0'
|
|
13
14
|
// Http#user_agent_argument passes curl the single argument "-A '<agent>'", so
|
|
@@ -50,7 +51,10 @@ type Json = Record<string, unknown>
|
|
|
50
51
|
const object = (value: unknown): value is Json =>
|
|
51
52
|
typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
52
53
|
|
|
53
|
-
export async function podSourceRoot(
|
|
54
|
+
export async function podSourceRoot(
|
|
55
|
+
spec: Json,
|
|
56
|
+
prepareEnv?: NodeJS.ProcessEnv,
|
|
57
|
+
): Promise<string> {
|
|
54
58
|
const name = String(spec.name)
|
|
55
59
|
const source = spec.source
|
|
56
60
|
if (!object(source)) throw new Error(`${name}: the podspec has no source`)
|
|
@@ -84,7 +88,7 @@ export async function podSourceRoot(spec: Json): Promise<string> {
|
|
|
84
88
|
if (strategy === 'git') await downloadGit(name, url, options, stage)
|
|
85
89
|
else await downloadHttp(name, url, options, stage)
|
|
86
90
|
removeGitEntries(stage)
|
|
87
|
-
await prepare(name, spec, stage)
|
|
91
|
+
await prepare(name, spec, stage, prepareEnv)
|
|
88
92
|
clean(spec, stage, platformNames)
|
|
89
93
|
fs.mkdirSync(path.dirname(root), { recursive: true })
|
|
90
94
|
publish(stage, root)
|
|
@@ -345,10 +349,18 @@ function stripHeredoc(text: string): string {
|
|
|
345
349
|
const chomp = (text: string) => text.replace(/(\r\n|\r|\n)$/, '')
|
|
346
350
|
|
|
347
351
|
// Installer::PodSourcePreparer#run_prepare_command
|
|
348
|
-
async function prepare(
|
|
352
|
+
async function prepare(
|
|
353
|
+
pod: string,
|
|
354
|
+
spec: Json,
|
|
355
|
+
directory: string,
|
|
356
|
+
prepareEnv?: NodeJS.ProcessEnv,
|
|
357
|
+
) {
|
|
349
358
|
if (typeof spec.prepare_command !== 'string') return
|
|
350
359
|
const command = chomp(stripHeredoc(chomp(stripHeredoc(spec.prepare_command))))
|
|
351
|
-
const env: NodeJS.ProcessEnv = {
|
|
360
|
+
const env: NodeJS.ProcessEnv = {
|
|
361
|
+
...(prepareEnv ?? (await podPrepareEnvironment(process.env))),
|
|
362
|
+
COCOAPODS_VERSION,
|
|
363
|
+
}
|
|
352
364
|
delete env.CDPATH
|
|
353
365
|
await run(pod, 'bash', ['-c', `\nset -e\n${command}`], {
|
|
354
366
|
label: 'prepare_command',
|
package/src/podfile-cocoapods.ts
CHANGED
|
@@ -1382,16 +1382,17 @@ function podClass(interp: Interpreter, name: string): RModule {
|
|
|
1382
1382
|
return found
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
1385
|
-
/** the app's `ios/Podfile
|
|
1385
|
+
/** evaluates the app's `ios/Podfile` inside its private, writable workspace copy. */
|
|
1386
1386
|
export function evaluatePodfile(
|
|
1387
1387
|
appPath: string,
|
|
1388
1388
|
env: Record<string, string | undefined>,
|
|
1389
|
+
workspace: string,
|
|
1389
1390
|
): EvaluatedPodfile {
|
|
1390
1391
|
// pod install finds the Podfile below the working directory, which Ruby reports resolved
|
|
1391
1392
|
const app = fs.realpathSync(appPath)
|
|
1392
1393
|
const file = path.join(app, 'ios', 'Podfile')
|
|
1393
1394
|
return rubyFailures(file, () => {
|
|
1394
|
-
const { interp } = cocoapodsInterpreter(app, [
|
|
1395
|
+
const { interp } = cocoapodsInterpreter(app, [workspace], env)
|
|
1395
1396
|
interp.evalString(PODFILE, 'cocoapods-core/podfile')
|
|
1396
1397
|
const pathname = interp.object.consts.get('Pathname') ?? null
|
|
1397
1398
|
const podfile = send(interp, podClass(interp, 'Podfile'), 'new', [
|
package/src/pods-install.ts
CHANGED
|
@@ -332,6 +332,7 @@ function writeWorkspace(workspace: string, projects: string[]) {
|
|
|
332
332
|
export async function installPods(
|
|
333
333
|
app: string,
|
|
334
334
|
env: Record<string, string | undefined>,
|
|
335
|
+
workspace: string,
|
|
335
336
|
): Promise<{ timings: Record<string, number> }> {
|
|
336
337
|
const timings: Record<string, number> = {}
|
|
337
338
|
let started = performance.now()
|
|
@@ -340,7 +341,7 @@ export async function installPods(
|
|
|
340
341
|
timings[label] = Math.round(now - started)
|
|
341
342
|
started = now
|
|
342
343
|
}
|
|
343
|
-
const resolved = await resolvePodfile(evaluatePodfile(app, env))
|
|
344
|
+
const resolved = await resolvePodfile(evaluatePodfile(app, env, workspace))
|
|
344
345
|
const { interp, file, podfile, sandbox: rubySandbox, resolver } = resolved
|
|
345
346
|
const iosRoot = path.dirname(file)
|
|
346
347
|
const call = (source: string, label: string) =>
|
|
@@ -794,6 +794,14 @@ export function installStdlib(interp: Interpreter) {
|
|
|
794
794
|
|
|
795
795
|
const regexp = object.consts.get('Regexp')
|
|
796
796
|
if (!(regexp instanceof RModule)) throw new Error('the interpreter defines no Regexp')
|
|
797
|
+
for (const name of ['new', 'compile'])
|
|
798
|
+
def(regexp, name, (c) => {
|
|
799
|
+
if (c.args.length !== 1) throw new UnsupportedRuby(`Regexp.${name} with options`)
|
|
800
|
+
const pattern = c.args[0]
|
|
801
|
+
if (pattern instanceof RRegexp)
|
|
802
|
+
return new RRegexp(pattern.source, new RegExp(pattern.re))
|
|
803
|
+
return rubyRegexp(text(interp, pattern), false, false, false)
|
|
804
|
+
})
|
|
797
805
|
// Regexp.escape escapes what is special in a pattern and spells out whitespace
|
|
798
806
|
const REGEXP_ESCAPES: Record<string, string> = {
|
|
799
807
|
' ': '\\ ',
|
|
@@ -80,7 +80,9 @@ export function applyInstalledSwiftTargets(
|
|
|
80
80
|
collection.headerAliases[key] = source.file
|
|
81
81
|
}
|
|
82
82
|
const nativeTargets = snapshot.input.nativeTargets ?? []
|
|
83
|
-
const installedTargets = swiftManifestTargets(
|
|
83
|
+
const installedTargets = swiftManifestTargets(
|
|
84
|
+
snapshot.input.files['Package.swift']!,
|
|
85
|
+
).filter((target) => !target.executable)
|
|
84
86
|
// binary dependencies have no original source target. retain their generated
|
|
85
87
|
// native surface and genuine linked library alongside the installed providers.
|
|
86
88
|
for (const target of installedTargets) {
|
package/src/swift-source-pods.ts
CHANGED
|
@@ -295,11 +295,11 @@ export async function collectSwiftSourcePods(
|
|
|
295
295
|
fs.writeFileSync(path.join(ios, `${APP}.xcodeproj/project.pbxproj`), project)
|
|
296
296
|
fs.writeFileSync(path.join(ios, 'main.swift'), 'import Foundation\n')
|
|
297
297
|
fs.writeFileSync(path.join(ios, 'Podfile'), podfile)
|
|
298
|
-
await installPods(
|
|
299
|
-
|
|
300
|
-
LANG: 'en_US.UTF-8',
|
|
301
|
-
|
|
302
|
-
|
|
298
|
+
await installPods(
|
|
299
|
+
work,
|
|
300
|
+
{ ...process.env, LANG: 'en_US.UTF-8', LC_ALL: 'en_US.UTF-8' },
|
|
301
|
+
work,
|
|
302
|
+
)
|
|
303
303
|
fs.writeFileSync(complete, key)
|
|
304
304
|
}
|
|
305
305
|
const actual = lockedPods(
|