peachsim 0.1.2665 → 0.1.2666
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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +171 -64
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-2LIKL4NX.mjs → acorn-PNTLNBTA.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UE2HEXE7.mjs → chunk-2JG7Y5DA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-V6PBAKRO.mjs → chunk-5HZMRPZT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-N75MISES.mjs → chunk-6I74FZC6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KG5EFPB2.mjs → chunk-BU4YLDQW.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-5DMO6UQJ.mjs → chunk-C4XXXBD5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2T4RBFSS.mjs → chunk-COOGIJXF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Y3BZF6OS.mjs → chunk-CVOZD2XG.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-23DZ4Q4Z.mjs → chunk-EFXLPDDZ.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-Q3TXM4LK.mjs → chunk-ETATV252.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6GGN7IFR.mjs → chunk-F57EOGPC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6AQXFUD7.mjs → chunk-HEDPVBHA.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-5KFGVINE.mjs → chunk-HZFAKEYY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3NJP5BIE.mjs → chunk-K3IKKG2I.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-T7EAO4MJ.mjs → chunk-M4Q5C23L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GHC55YFV.mjs → chunk-ONR3YOTC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OGFQ2RML.mjs → chunk-QPW4OH73.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MWKWGPB6.mjs → chunk-R4EXMC3C.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2RXTGRSX.mjs → chunk-RY6JI3XR.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-H5ATIUKE.mjs → chunk-SYOGZX55.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2GUF7MKM.mjs → chunk-WSGBYXP2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CAOG2CSG.mjs → chunk-WTQUIDPZ.mjs} +14 -14
- package/dist-lib/esm-chunks/{chunk-SUMGPDQS.mjs → chunk-ZIULCB6R.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XQPRIXPA.mjs → chunk-ZQDBFNSQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KPTB74RN.mjs → chunk-ZU6LSMDO.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-I777GKX2.mjs → metro-layout-parser-YGB3P5A5.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-KFKVJOGQ.mjs → swift-package-prebuilt-GJ7ST7WE.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-FA7MI4R5.mjs → swift-sdk-app-module-UAK2NDAI.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-5GYGKC24.mjs → swift-sdk-image-TEAM72UD.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-I574RU2A.mjs → swift-sdk-image-producer-VIE2CP6M.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +171 -64
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +171 -64
- package/dist-lib/host/fetch-proxy-handler.cjs +20 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +171 -64
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/package.json +1 -1
- package/src/pod-lockfile.ts +29 -5
- package/src/pod-sources.ts +46 -4
- package/src/podfile-cocoapods.ts +70 -13
- package/src/pods-install.ts +72 -44
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __commonJS = (cb, mod) => function __require() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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
|
|
|
4
4
|
// ../../node_modules/valibot/dist/index.cjs
|
package/dist-lib/vendor/ws.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist-lib/vendor/zod.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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 __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (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;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2666 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
parse
|
|
4
|
-
} from "./esm-chunks/chunk-
|
|
4
|
+
} from "./esm-chunks/chunk-R4EXMC3C.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__privateAdd,
|
|
7
7
|
__privateGet,
|
|
8
8
|
__publicField
|
|
9
|
-
} from "./esm-chunks/chunk-
|
|
9
|
+
} from "./esm-chunks/chunk-M4Q5C23L.mjs";
|
|
10
10
|
|
|
11
11
|
// src/worklet-kernel.ts
|
|
12
12
|
var Unsupported = class extends Error {
|
package/package.json
CHANGED
package/src/pod-lockfile.ts
CHANGED
|
@@ -56,11 +56,13 @@ function declarationsByRoot(declarations: string[]): Map<string, Set<string>> {
|
|
|
56
56
|
return roots
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export function
|
|
59
|
+
export function lockedPodResolution(
|
|
60
60
|
file: string,
|
|
61
61
|
declarations: string[],
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
gitSources: ReadonlyMap<string, Record<string, unknown>>,
|
|
63
|
+
): { versions: Record<string, string>; gitCommits: Map<string, string> } {
|
|
64
|
+
const gitCommits = new Map<string, string>()
|
|
65
|
+
if (!fs.existsSync(file)) return { versions: {}, gitCommits }
|
|
64
66
|
const lock: unknown = yaml.parse(fs.readFileSync(file, 'utf8'))
|
|
65
67
|
if (!record(lock)) throw new Error(`${file}: expected a CocoaPods lockfile`)
|
|
66
68
|
const dependencies = lock.DEPENDENCIES ?? []
|
|
@@ -71,7 +73,7 @@ export function lockedPodVersions(
|
|
|
71
73
|
)
|
|
72
74
|
)
|
|
73
75
|
throw new Error(`${file}: invalid DEPENDENCIES list`)
|
|
74
|
-
if (dependencies.length === 0) return {}
|
|
76
|
+
if (dependencies.length === 0) return { versions: {}, gitCommits }
|
|
75
77
|
|
|
76
78
|
const previous = declarationsByRoot(dependencies)
|
|
77
79
|
const current = declarationsByRoot(declarations)
|
|
@@ -81,6 +83,28 @@ export function lockedPodVersions(
|
|
|
81
83
|
if (after?.size === before.size && [...before].every((entry) => after.has(entry)))
|
|
82
84
|
unchanged.add(root)
|
|
83
85
|
}
|
|
86
|
+
const external = lock['EXTERNAL SOURCES']
|
|
87
|
+
const checkouts = lock['CHECKOUT OPTIONS']
|
|
88
|
+
for (const [name, source] of gitSources) {
|
|
89
|
+
if (!unchanged.has(name)) continue
|
|
90
|
+
const before = record(external) ? external[name] : undefined
|
|
91
|
+
if (
|
|
92
|
+
!record(before) ||
|
|
93
|
+
Object.keys(before).length !== Object.keys(source).length ||
|
|
94
|
+
Object.entries(source).some(([key, value]) => before[`:${key}`] !== value)
|
|
95
|
+
) {
|
|
96
|
+
unchanged.delete(name)
|
|
97
|
+
continue
|
|
98
|
+
}
|
|
99
|
+
const checkout = record(checkouts) ? checkouts[name] : undefined
|
|
100
|
+
if (
|
|
101
|
+
record(checkout) &&
|
|
102
|
+
checkout[':git'] === source.git &&
|
|
103
|
+
typeof checkout[':commit'] === 'string' &&
|
|
104
|
+
/^[a-f0-9]{40}(?:[a-f0-9]{24})?$/.test(checkout[':commit'])
|
|
105
|
+
)
|
|
106
|
+
gitCommits.set(name, checkout[':commit'])
|
|
107
|
+
}
|
|
84
108
|
|
|
85
109
|
// cocoapods detaches changed roots but retains descendants still reachable
|
|
86
110
|
// from another unchanged root.
|
|
@@ -102,5 +126,5 @@ export function lockedPodVersions(
|
|
|
102
126
|
}
|
|
103
127
|
for (const root of unchanged)
|
|
104
128
|
for (const dependency of previous.get(root)!) visit(dependency.split(' ', 1)[0]!)
|
|
105
|
-
return Object.fromEntries(versions)
|
|
129
|
+
return { versions: Object.fromEntries(versions), gitCommits }
|
|
106
130
|
}
|
package/src/pod-sources.ts
CHANGED
|
@@ -87,9 +87,7 @@ export async function podSourceRoot(
|
|
|
87
87
|
try {
|
|
88
88
|
if (strategy === 'git') await downloadGit(name, url, options, stage)
|
|
89
89
|
else await downloadHttp(name, url, options, stage)
|
|
90
|
-
|
|
91
|
-
await prepare(name, spec, stage, prepareEnv)
|
|
92
|
-
clean(spec, stage, platformNames)
|
|
90
|
+
await preparePodSource(spec, stage, prepareEnv)
|
|
93
91
|
fs.mkdirSync(path.dirname(root), { recursive: true })
|
|
94
92
|
publish(stage, root)
|
|
95
93
|
} finally {
|
|
@@ -98,6 +96,50 @@ export async function podSourceRoot(
|
|
|
98
96
|
return root
|
|
99
97
|
}
|
|
100
98
|
|
|
99
|
+
export async function preparePodSource(
|
|
100
|
+
spec: Json,
|
|
101
|
+
root: string,
|
|
102
|
+
prepareEnv?: NodeJS.ProcessEnv,
|
|
103
|
+
): Promise<void> {
|
|
104
|
+
removeGitEntries(root)
|
|
105
|
+
await prepare(String(spec.name), spec, root, prepareEnv)
|
|
106
|
+
clean(spec, root, platformNames)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export async function checkoutGitPod(
|
|
110
|
+
name: string,
|
|
111
|
+
source: Json,
|
|
112
|
+
staging: string,
|
|
113
|
+
lockedCommit: string | undefined,
|
|
114
|
+
) {
|
|
115
|
+
const { git, ...options } = source
|
|
116
|
+
if (
|
|
117
|
+
!/^[A-Za-z_][\w.+-]*$/.test(name) ||
|
|
118
|
+
typeof git !== 'string' ||
|
|
119
|
+
Object.keys(options).some((key) => !OPTIONS.git!.includes(key)) ||
|
|
120
|
+
['commit', 'branch', 'tag'].some(
|
|
121
|
+
(key) => key in options && typeof options[key] !== 'string',
|
|
122
|
+
) ||
|
|
123
|
+
('submodules' in options && typeof options.submodules !== 'boolean')
|
|
124
|
+
)
|
|
125
|
+
throw new Error(`${name}: invalid Podfile Git source ${JSON.stringify(source)}`)
|
|
126
|
+
|
|
127
|
+
const root = path.join(staging, name)
|
|
128
|
+
await downloadGit(
|
|
129
|
+
name,
|
|
130
|
+
git,
|
|
131
|
+
lockedCommit ? { commit: lockedCommit, submodules: options.submodules } : options,
|
|
132
|
+
root,
|
|
133
|
+
)
|
|
134
|
+
const commit = (await run(name, 'git', ['-C', root, 'rev-parse', 'HEAD'])).trim()
|
|
135
|
+
const podspec = [`${name}.podspec`, `${name}.podspec.json`]
|
|
136
|
+
.map((file) => path.join(root, file))
|
|
137
|
+
.find((file) => fs.lstatSync(file, { throwIfNoEntry: false })?.isFile())
|
|
138
|
+
if (!podspec)
|
|
139
|
+
throw new Error(`${name}: no podspec in Podfile Git checkout ${git}@${commit}`)
|
|
140
|
+
return { root, podspec, git, commit, submodules: options.submodules === true }
|
|
141
|
+
}
|
|
142
|
+
|
|
101
143
|
function canonicalJson(value: unknown): string {
|
|
102
144
|
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(',')}]`
|
|
103
145
|
if (object(value))
|
|
@@ -150,7 +192,7 @@ async function downloadGit(pod: string, url: string, options: Json, target: stri
|
|
|
150
192
|
let commit = text('commit')
|
|
151
193
|
const tag = text('tag')
|
|
152
194
|
for (const value of [url, branch, commit, tag])
|
|
153
|
-
if (value?.startsWith('
|
|
195
|
+
if (value?.startsWith('-') || value?.includes(' --'))
|
|
154
196
|
throw new Error(`${pod}: unsafe git source input ${JSON.stringify(options)}`)
|
|
155
197
|
if (branch) {
|
|
156
198
|
// Git.preprocess_options pins a branch to the commit it names now
|
package/src/podfile-cocoapods.ts
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import fs from 'node:fs'
|
|
6
6
|
import path from 'node:path'
|
|
7
7
|
import { sourceSpecificationFile, sourceVersions, specRepoKey } from './cocoapods-trunk'
|
|
8
|
-
import {
|
|
8
|
+
import { isRecord } from './is-record'
|
|
9
|
+
import { lockedPodResolution } from './pod-lockfile'
|
|
10
|
+
import { checkoutGitPod } from './pod-sources'
|
|
9
11
|
import { cocoapodsInterpreter, rubyFailures } from './podspec-cocoapods'
|
|
10
12
|
import {
|
|
11
13
|
type Frame,
|
|
@@ -51,11 +53,12 @@ module Pod
|
|
|
51
53
|
end
|
|
52
54
|
|
|
53
55
|
class Sandbox
|
|
54
|
-
attr_reader :root, :stored_podspecs
|
|
56
|
+
attr_reader :root, :stored_podspecs, :checkout_sources
|
|
55
57
|
def initialize(root)
|
|
56
58
|
@root = Pathname.new(root)
|
|
57
59
|
@stored_podspecs = {}
|
|
58
60
|
@local_paths = {}
|
|
61
|
+
@checkout_sources = {}
|
|
59
62
|
end
|
|
60
63
|
def specifications_root
|
|
61
64
|
root + 'Local Podspecs'
|
|
@@ -1098,7 +1101,7 @@ module Pod
|
|
|
1098
1101
|
end
|
|
1099
1102
|
`
|
|
1100
1103
|
|
|
1101
|
-
// CocoaPods 1.17's
|
|
1104
|
+
// CocoaPods 1.17's external sources (MIT, the CocoaPods team), and its
|
|
1102
1105
|
// resolver's outcome for dependency graphs without version conflicts. Molinillo
|
|
1103
1106
|
// backtracks on a conflict; here each trunk pod takes the highest version every
|
|
1104
1107
|
// requirement on it allows, and a conflict raises.
|
|
@@ -1112,6 +1115,8 @@ module Pod
|
|
|
1112
1115
|
PodspecSource.new(name, params, podfile_path)
|
|
1113
1116
|
elsif params.key?(:path)
|
|
1114
1117
|
PathSource.new(name, params, podfile_path)
|
|
1118
|
+
elsif params.key?(:git)
|
|
1119
|
+
GitSource.new(name, params, podfile_path)
|
|
1115
1120
|
else
|
|
1116
1121
|
raise Informative, "Peach does not fetch the external source of '#{name}': #{params}"
|
|
1117
1122
|
end
|
|
@@ -1174,6 +1179,17 @@ module Pod
|
|
|
1174
1179
|
declared_path =~ %r{^.+://} ? declared_path : normalized_podspec_path(declared_path)
|
|
1175
1180
|
end
|
|
1176
1181
|
end
|
|
1182
|
+
|
|
1183
|
+
class GitSource < AbstractExternalSource
|
|
1184
|
+
def fetch(sandbox)
|
|
1185
|
+
podspec, git, commit, submodules = Resolver::Trunk.git_checkout(name)
|
|
1186
|
+
raise Informative, "No Git checkout prepared for '#{name}'" unless podspec
|
|
1187
|
+
store_podspec(sandbox, Pathname(podspec))
|
|
1188
|
+
source = { :git => git, :commit => commit }
|
|
1189
|
+
source[:submodules] = true if submodules
|
|
1190
|
+
sandbox.checkout_sources[name] = source
|
|
1191
|
+
end
|
|
1192
|
+
end
|
|
1177
1193
|
end
|
|
1178
1194
|
|
|
1179
1195
|
class Resolver
|
|
@@ -1384,6 +1400,7 @@ export interface ResolvedPodfile extends EvaluatedPodfile {
|
|
|
1384
1400
|
sandbox: RObject
|
|
1385
1401
|
installer: RObject
|
|
1386
1402
|
resolver: RObject
|
|
1403
|
+
gitCheckouts: ReadonlyMap<string, Awaited<ReturnType<typeof checkoutGitPod>>>
|
|
1387
1404
|
}
|
|
1388
1405
|
|
|
1389
1406
|
const send = (interp: Interpreter, receiver: Value, name: string, args: Value[] = []) =>
|
|
@@ -1441,6 +1458,7 @@ export function podfileHash({ interp, podfile }: EvaluatedPodfile): unknown {
|
|
|
1441
1458
|
*/
|
|
1442
1459
|
export async function resolvePodfile(
|
|
1443
1460
|
evaluated: EvaluatedPodfile,
|
|
1461
|
+
staging: string,
|
|
1444
1462
|
): Promise<ResolvedPodfile> {
|
|
1445
1463
|
const { file, interp, podfile } = evaluated
|
|
1446
1464
|
const versions = new Map<string, string[]>()
|
|
@@ -1450,7 +1468,8 @@ export async function resolvePodfile(
|
|
|
1450
1468
|
const sources = toJson(interp, send(interp, podfile, 'sources'))
|
|
1451
1469
|
if (!Array.isArray(sources) || !sources.every((source) => typeof source === 'string'))
|
|
1452
1470
|
throw new Error(`${file}: Podfile sources are ${JSON.stringify(sources)}`)
|
|
1453
|
-
const
|
|
1471
|
+
const gitCheckouts = new Map<string, Awaited<ReturnType<typeof checkoutGitPod>>>()
|
|
1472
|
+
const resolution = rubyFailures(file, () => {
|
|
1454
1473
|
interp.evalString(RESOLVER, 'cocoapods/resolver')
|
|
1455
1474
|
const pathname = interp.object.consts.get('Pathname') ?? null
|
|
1456
1475
|
const specification = podClass(interp, 'Specification')
|
|
@@ -1487,21 +1506,49 @@ export async function resolvePodfile(
|
|
|
1487
1506
|
str(specRepoKey(origins.get(`${arg(c.args, 0)}/${arg(c.args, 1)}`) ?? 'trunk')),
|
|
1488
1507
|
true,
|
|
1489
1508
|
)
|
|
1509
|
+
interp.defineNative(
|
|
1510
|
+
trunk,
|
|
1511
|
+
'git_checkout',
|
|
1512
|
+
(c) => {
|
|
1513
|
+
const checkout = gitCheckouts.get(arg(c.args, 0))
|
|
1514
|
+
return checkout
|
|
1515
|
+
? [
|
|
1516
|
+
str(checkout.podspec),
|
|
1517
|
+
str(checkout.git),
|
|
1518
|
+
str(checkout.commit),
|
|
1519
|
+
checkout.submodules,
|
|
1520
|
+
]
|
|
1521
|
+
: null
|
|
1522
|
+
},
|
|
1523
|
+
true,
|
|
1524
|
+
)
|
|
1490
1525
|
const sandbox = send(interp, podClass(interp, 'Sandbox'), 'new', [
|
|
1491
1526
|
str(path.join(path.dirname(file), 'Pods')),
|
|
1492
1527
|
])
|
|
1493
1528
|
const declarations = send(interp, podfile, 'dependencies')
|
|
1494
1529
|
if (!Array.isArray(declarations))
|
|
1495
1530
|
throw new Error('Podfile#dependencies returned no list')
|
|
1496
|
-
const
|
|
1531
|
+
const gitSources = new Map<string, Record<string, unknown>>()
|
|
1532
|
+
for (const declaration of declarations) {
|
|
1533
|
+
const source = toJson(interp, send(interp, declaration, 'external_source'))
|
|
1534
|
+
if (
|
|
1535
|
+
isRecord(source) &&
|
|
1536
|
+
'git' in source &&
|
|
1537
|
+
!('path' in source) &&
|
|
1538
|
+
!('podspec' in source)
|
|
1539
|
+
)
|
|
1540
|
+
gitSources.set(interp.toS(send(interp, declaration, 'root_name')), source)
|
|
1541
|
+
}
|
|
1542
|
+
const locked = lockedPodResolution(
|
|
1497
1543
|
path.join(path.dirname(file), 'Podfile.lock'),
|
|
1498
1544
|
declarations.map((dependency) => interp.toS(dependency)),
|
|
1545
|
+
gitSources,
|
|
1499
1546
|
)
|
|
1500
1547
|
const resolver = send(interp, podClass(interp, 'Resolver'), 'new', [
|
|
1501
1548
|
sandbox,
|
|
1502
1549
|
podfile,
|
|
1503
1550
|
trunk,
|
|
1504
|
-
fromJson(locked),
|
|
1551
|
+
fromJson(locked.versions),
|
|
1505
1552
|
])
|
|
1506
1553
|
if (!(sandbox instanceof RObject) || !(resolver instanceof RObject))
|
|
1507
1554
|
throw new Error('Pod::Resolver.new returned no object')
|
|
@@ -1511,17 +1558,27 @@ export async function resolvePodfile(
|
|
|
1511
1558
|
])
|
|
1512
1559
|
if (!(installer instanceof RObject))
|
|
1513
1560
|
throw new Error('Pod::Installer.new returned no object')
|
|
1514
|
-
|
|
1515
|
-
interp,
|
|
1516
|
-
send(interp, installer, 'peach_begin_resolution', [resolver]),
|
|
1517
|
-
)
|
|
1518
|
-
return { sandbox, installer, resolver, firstMissing }
|
|
1561
|
+
return { sandbox, installer, resolver, gitSources, gitCommits: locked.gitCommits }
|
|
1519
1562
|
})
|
|
1563
|
+
const { sandbox, installer, resolver, gitSources, gitCommits } = resolution
|
|
1564
|
+
const fetched = await Promise.allSettled(
|
|
1565
|
+
[...gitSources].map(async ([name, source]) => {
|
|
1566
|
+
gitCheckouts.set(
|
|
1567
|
+
name,
|
|
1568
|
+
await checkoutGitPod(name, source, staging, gitCommits.get(name)),
|
|
1569
|
+
)
|
|
1570
|
+
}),
|
|
1571
|
+
)
|
|
1572
|
+
for (const checkout of fetched)
|
|
1573
|
+
if (checkout.status === 'rejected') throw checkout.reason
|
|
1520
1574
|
// podfile wrappers run once. only the resolver resumes after each CDN fetch.
|
|
1521
|
-
let missing =
|
|
1575
|
+
let missing = rubyFailures(file, () =>
|
|
1576
|
+
toJson(interp, send(interp, installer, 'peach_begin_resolution', [resolver])),
|
|
1577
|
+
)
|
|
1522
1578
|
for (;;) {
|
|
1523
1579
|
if (!Array.isArray(missing)) throw new Error('Pod::Resolver#resolve returned no list')
|
|
1524
|
-
if (missing.length === 0)
|
|
1580
|
+
if (missing.length === 0)
|
|
1581
|
+
return { ...evaluated, sandbox, installer, resolver, gitCheckouts }
|
|
1525
1582
|
await Promise.all(
|
|
1526
1583
|
missing.map(async (entry: unknown) => {
|
|
1527
1584
|
if (!Array.isArray(entry) || typeof entry[0] !== 'string')
|
package/src/pods-install.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { isDict, list, parseOpenStepPlist, str, type PlistDict } from './openste
|
|
|
9
9
|
import { PbxTable, serializePbxproj } from './pbx-table'
|
|
10
10
|
import { POD_GRAPH_SPECIFICATIONS } from './pod-graph-specifications'
|
|
11
11
|
import { podPrepareEnvironment } from './pod-prepare-toolchain'
|
|
12
|
-
import { cleanInstalledPod, podSourceRoot } from './pod-sources'
|
|
12
|
+
import { cleanInstalledPod, podSourceRoot, preparePodSource } from './pod-sources'
|
|
13
13
|
import { evaluatePodfile, resolvePodfile } from './podfile-cocoapods'
|
|
14
14
|
import { analyzePods, type UserTargetInspection } from './pods-analysis'
|
|
15
15
|
import { PodsBuildSettings } from './pods-build-settings'
|
|
@@ -60,6 +60,7 @@ lambda do |podfile, sandbox, resolver|
|
|
|
60
60
|
'DEPENDENCIES' => podfile.dependencies.map(&:to_s),
|
|
61
61
|
'SPEC REPOS' => repos,
|
|
62
62
|
'EXTERNAL SOURCES' => podfile.dependencies.select(&:external?).each_with_object({}) { |dep, result| result[dep.root_name] = dep.external_source },
|
|
63
|
+
'CHECKOUT OPTIONS' => sandbox.checkout_sources,
|
|
63
64
|
'SPEC CHECKSUMS' => specs.select(&:defined_in_file).each_with_object({}) { |spec, result| result[spec.root.name] = spec.checksum },
|
|
64
65
|
'PODFILE CHECKSUM' => podfile.checksum,
|
|
65
66
|
'COCOAPODS' => '${COCOAPODS_VERSION}',
|
|
@@ -350,6 +351,7 @@ function yaml(
|
|
|
350
351
|
}
|
|
351
352
|
if (value instanceof RString) return yamlString(value.s).trim()
|
|
352
353
|
if (value instanceof RSymbol) return `:${value.name}`
|
|
354
|
+
if (typeof value === 'boolean') return String(value)
|
|
353
355
|
throw new Error(
|
|
354
356
|
`the lockfile holds ${interp.toS(value)}, which YAMLHelper does not write`,
|
|
355
357
|
)
|
|
@@ -394,6 +396,72 @@ function writeWorkspace(workspace: string, projects: string[]) {
|
|
|
394
396
|
)
|
|
395
397
|
}
|
|
396
398
|
|
|
399
|
+
async function preparePodInstallation(
|
|
400
|
+
app: string,
|
|
401
|
+
prepareEnv: NodeJS.ProcessEnv,
|
|
402
|
+
workspace: string,
|
|
403
|
+
lap: (label: string) => void,
|
|
404
|
+
) {
|
|
405
|
+
const evaluated = evaluatePodfile(app, prepareEnv, workspace)
|
|
406
|
+
const iosRoot = path.dirname(evaluated.file)
|
|
407
|
+
const staging = fs.mkdtempSync(path.join(iosRoot, '.peach-pod-checkouts-'))
|
|
408
|
+
try {
|
|
409
|
+
const resolved = await resolvePodfile(evaluated, staging)
|
|
410
|
+
const { interp, file, podfile, sandbox: rubySandbox, resolver } = resolved
|
|
411
|
+
const call = (source: string, label: string) =>
|
|
412
|
+
rubyFailures(file, () =>
|
|
413
|
+
interp.callMethod(
|
|
414
|
+
interp.evalString(source, label),
|
|
415
|
+
'call',
|
|
416
|
+
[podfile, rubySandbox, resolver],
|
|
417
|
+
null,
|
|
418
|
+
null,
|
|
419
|
+
null,
|
|
420
|
+
null,
|
|
421
|
+
),
|
|
422
|
+
)
|
|
423
|
+
const inputs = toJson(interp, call(INSTALL_INPUTS, 'peach/install-inputs'))
|
|
424
|
+
if (!isInstallInputs(inputs))
|
|
425
|
+
throw new Error(`${file}: the Podfile's install inputs are malformed`)
|
|
426
|
+
const lock = lockfileYaml(interp, call(LOCKFILE, 'cocoapods-core/lockfile'))
|
|
427
|
+
lap('resolve')
|
|
428
|
+
|
|
429
|
+
const podsRoot = path.join(iosRoot, 'Pods')
|
|
430
|
+
fs.rmSync(podsRoot, { recursive: true, force: true })
|
|
431
|
+
fs.mkdirSync(podsRoot, { recursive: true })
|
|
432
|
+
const downloaded = new Map<string, Record<string, unknown>>()
|
|
433
|
+
const copies = await Promise.allSettled(
|
|
434
|
+
inputs.downloads.map(async ([name, json]) => {
|
|
435
|
+
const spec: unknown = JSON.parse(json)
|
|
436
|
+
if (!isRecord(spec))
|
|
437
|
+
throw new Error(`${name}: the specification is no JSON object`)
|
|
438
|
+
downloaded.set(name, spec)
|
|
439
|
+
const checkout = resolved.gitCheckouts.get(name)
|
|
440
|
+
const destination = path.join(podsRoot, name)
|
|
441
|
+
fs.cpSync(
|
|
442
|
+
checkout?.root ?? (await podSourceRoot(spec, prepareEnv)),
|
|
443
|
+
destination,
|
|
444
|
+
{
|
|
445
|
+
recursive: true,
|
|
446
|
+
mode: fs.constants.COPYFILE_FICLONE,
|
|
447
|
+
verbatimSymlinks: true,
|
|
448
|
+
},
|
|
449
|
+
)
|
|
450
|
+
if (checkout) await preparePodSource(spec, destination, prepareEnv)
|
|
451
|
+
}),
|
|
452
|
+
)
|
|
453
|
+
for (const copy of copies) if (copy.status === 'rejected') throw copy.reason
|
|
454
|
+
fs.writeFileSync(
|
|
455
|
+
path.join(podsRoot, POD_GRAPH_SPECIFICATIONS),
|
|
456
|
+
JSON.stringify(Object.fromEntries(inputs.stored)),
|
|
457
|
+
)
|
|
458
|
+
lap('download')
|
|
459
|
+
return { resolved, inputs, lock, downloaded, iosRoot, podsRoot }
|
|
460
|
+
} finally {
|
|
461
|
+
fs.rmSync(staging, { recursive: true, force: true })
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
397
465
|
/** installs the pods of `app`'s ios/Podfile as `pod install` does, with `env` as the Podfile's ENV. */
|
|
398
466
|
export async function installPods(
|
|
399
467
|
app: string,
|
|
@@ -408,49 +476,9 @@ export async function installPods(
|
|
|
408
476
|
started = now
|
|
409
477
|
}
|
|
410
478
|
const prepareEnv = await podPrepareEnvironment({ ...process.env, ...env })
|
|
411
|
-
const resolved
|
|
412
|
-
|
|
413
|
-
const
|
|
414
|
-
const call = (source: string, label: string) =>
|
|
415
|
-
rubyFailures(file, () =>
|
|
416
|
-
interp.callMethod(
|
|
417
|
-
interp.evalString(source, label),
|
|
418
|
-
'call',
|
|
419
|
-
[podfile, rubySandbox, resolver],
|
|
420
|
-
null,
|
|
421
|
-
null,
|
|
422
|
-
null,
|
|
423
|
-
null,
|
|
424
|
-
),
|
|
425
|
-
)
|
|
426
|
-
const inputs = toJson(interp, call(INSTALL_INPUTS, 'peach/install-inputs'))
|
|
427
|
-
if (!isInstallInputs(inputs))
|
|
428
|
-
throw new Error(`${file}: the Podfile's install inputs are malformed`)
|
|
429
|
-
const lock = lockfileYaml(interp, call(LOCKFILE, 'cocoapods-core/lockfile'))
|
|
430
|
-
lap('resolve')
|
|
431
|
-
|
|
432
|
-
const podsRoot = path.join(iosRoot, 'Pods')
|
|
433
|
-
fs.rmSync(podsRoot, { recursive: true, force: true })
|
|
434
|
-
fs.mkdirSync(podsRoot, { recursive: true })
|
|
435
|
-
const downloaded = new Map<string, Record<string, unknown>>()
|
|
436
|
-
await Promise.all(
|
|
437
|
-
inputs.downloads.map(async ([name, json]) => {
|
|
438
|
-
const spec: unknown = JSON.parse(json)
|
|
439
|
-
if (!isRecord(spec)) throw new Error(`${name}: the specification is no JSON object`)
|
|
440
|
-
downloaded.set(name, spec)
|
|
441
|
-
fs.cpSync(await podSourceRoot(spec, prepareEnv), path.join(podsRoot, name), {
|
|
442
|
-
recursive: true,
|
|
443
|
-
mode: fs.constants.COPYFILE_FICLONE,
|
|
444
|
-
verbatimSymlinks: true,
|
|
445
|
-
})
|
|
446
|
-
}),
|
|
447
|
-
)
|
|
448
|
-
fs.writeFileSync(
|
|
449
|
-
path.join(podsRoot, POD_GRAPH_SPECIFICATIONS),
|
|
450
|
-
JSON.stringify(Object.fromEntries(inputs.stored)),
|
|
451
|
-
)
|
|
452
|
-
lap('download')
|
|
453
|
-
|
|
479
|
+
const { resolved, inputs, lock, downloaded, iosRoot, podsRoot } =
|
|
480
|
+
await preparePodInstallation(app, prepareEnv, workspace, lap)
|
|
481
|
+
const { interp, file } = resolved
|
|
454
482
|
const userProjects = new Map<string, { table: ProjectTable; ruby: RObject }>()
|
|
455
483
|
const inspected = inputs.definitions.map((definition) => {
|
|
456
484
|
const projectPath = userProjectPath(iosRoot, definition)
|