peachsim 0.1.2296 → 0.1.2298
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 +1153 -1070
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +47 -24
- 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 +121 -38
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -6
- 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 +2391 -4521
- 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 +14 -2
- 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 +4536 -6667
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -3
- 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 +81 -85
- 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 +122 -39
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- 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 +5 -4
- package/dist-lib/vite.cjs +8 -6
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +10 -8
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +0 -1
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/settings/device-spec-bus.d.ts +5 -0
- package/kotlin/README.md +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/kotlin/toolchain.json +5 -1
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXAction.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXAnswerCallAction.h +20 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXBase.h +20 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCall.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallAction.h +23 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallController.h +53 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallDirectory.h +16 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallDirectoryExtensionContext.h +86 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallDirectoryManager.h +29 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallDirectoryProvider.h +21 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallObserver.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXCallUpdate.h +43 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXEndCallAction.h +20 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXError.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXHandle.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXPlayDTMFCallAction.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXProvider.h +127 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXProviderConfiguration.h +42 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXSetGroupCallAction.h +27 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXSetHeldCallAction.h +23 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXSetMutedCallAction.h +23 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXSetTranslatingCallAction.h +40 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXStartCallAction.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CXTransaction.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CallKit.apinotes +36 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Headers/CallKit.h +35 -0
- package/sdk/ios/System/Library/Frameworks/CallKit.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/React.framework/Headers/React.h +14 -0
- package/src/expo-autolinking.ts +1 -1
- package/src/expo-swift-host.ts +5 -5
- package/src/kotlin-toolchain.ts +16 -1
- package/src/kotlinSdkContract.ts +2 -1
- package/src/metro-plugin.ts +1 -4
- package/src/nitro-adapter.lock.json +284 -284
- package/src/nitro-compile.ts +69 -4
- package/src/nitro-superset.lock.json +4 -4
- package/src/one-sdk/source.ts +2 -1
- package/src/prepared-native-inventory.ts +8 -2
- package/src/react-native-autolinking.ts +28 -9
- package/src/swift-coverage/xcode-packages.ts +2 -1
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +3 -1
- package/src/turbo-bundle.ts +14 -6
- package/src/turbo-codegen-intake.ts +3 -2
- package/src/turbo-runtime.lock.json +22 -22
- package/src/turbo-source.ts +2 -4
package/src/nitro-compile.ts
CHANGED
|
@@ -38,10 +38,18 @@ import {
|
|
|
38
38
|
swiftManifestTargets,
|
|
39
39
|
swiftManifestSettings,
|
|
40
40
|
clangSettingEntries,
|
|
41
|
+
isSwiftNativeTranslationUnit,
|
|
41
42
|
} from './swift-package'
|
|
42
43
|
import { projectSourceKey } from './swift-source-file'
|
|
43
44
|
import { appPodfileLock, collectSwiftSourcePods } from './swift-source-pods'
|
|
44
|
-
import {
|
|
45
|
+
import { collectTurboCompileInput } from './turbo-compile'
|
|
46
|
+
import {
|
|
47
|
+
collectTurboSources,
|
|
48
|
+
discoverTurboProviders,
|
|
49
|
+
podspecSourceFiles,
|
|
50
|
+
TURBO_CORE_TARGET,
|
|
51
|
+
type TurboInstalledPod,
|
|
52
|
+
} from './turbo-source'
|
|
45
53
|
import { installedXcodeWorkspace, readXcodeAppTarget } from './xcode-project'
|
|
46
54
|
import type { NitroBuildConfiguration } from './nitroContract'
|
|
47
55
|
import type { SwiftCompileInput } from './swift-compile'
|
|
@@ -117,7 +125,7 @@ export function collectNitroCompileInput(
|
|
|
117
125
|
throw new Error('Nitro pod targets have ambiguous names or declarations')
|
|
118
126
|
// the archive has no module, so NitroCore's module map declares its entry.
|
|
119
127
|
files['Sources/NitroCore/include/PeachNitroEntry.hpp'] =
|
|
120
|
-
'#pragma once\nextern "C" void peachNitroInitialize();\n'
|
|
128
|
+
'#pragma once\n#include <functional>\nextern "C" void peachNitroInitialize();\nnamespace peach::nitro { void dispatchAsync(std::function<void()> work); }\n'
|
|
121
129
|
const core = files['Sources/NitroCore/include/module.modulemap']
|
|
122
130
|
if (!core?.endsWith(' export * }\n'))
|
|
123
131
|
throw new Error('Nitro collection has no NitroCore module map')
|
|
@@ -149,19 +157,20 @@ export function collectNitroCompileInput(
|
|
|
149
157
|
files[entry] = views
|
|
150
158
|
? [
|
|
151
159
|
'import SwiftUI',
|
|
160
|
+
'import PeachJSON',
|
|
152
161
|
'import UIKit',
|
|
153
162
|
`import ${NITRO_VIEWS_TARGET}`,
|
|
154
163
|
...imports.map((name) => `import ${name}`),
|
|
155
164
|
'',
|
|
156
165
|
'@main struct PeachNitroApp: PeachPackage {',
|
|
157
166
|
` init() { ${register.join('; ')} }`,
|
|
158
|
-
' func view(props: JSON) -> PeachNitroView { PeachNitroView(props: props) }',
|
|
167
|
+
' func view(props: PeachJSON.JSON) -> PeachNitroView { PeachNitroView(props: props) }',
|
|
159
168
|
'}',
|
|
160
169
|
'',
|
|
161
170
|
'struct PeachNitroView: UIViewRepresentable {',
|
|
162
171
|
' let id: Int32',
|
|
163
172
|
'',
|
|
164
|
-
' init(props: JSON) {',
|
|
173
|
+
' init(props: PeachJSON.JSON) {',
|
|
165
174
|
' guard case .object(let fields) = props, let field = fields.first(where: { $0.0 == "id" }), case .number(let id) = field.1 else {',
|
|
166
175
|
' fatalError("a Nitro view mounts with its numeric id")',
|
|
167
176
|
' }',
|
|
@@ -185,6 +194,7 @@ export function collectNitroCompileInput(
|
|
|
185
194
|
'',
|
|
186
195
|
].join('\n')
|
|
187
196
|
const executableDependencies = [
|
|
197
|
+
...targets.map(({ name }) => name),
|
|
188
198
|
...(views ? [NITRO_VIEWS_TARGET] : []),
|
|
189
199
|
...collection.registrations.map(({ target }) => target),
|
|
190
200
|
]
|
|
@@ -240,6 +250,7 @@ export function collectNitroCompileInput(
|
|
|
240
250
|
NitroCore: adapter.base64,
|
|
241
251
|
},
|
|
242
252
|
optimize: true,
|
|
253
|
+
staticClangTargets: dependencies?.staticClangTargets,
|
|
243
254
|
nativeTargets: [
|
|
244
255
|
...(dependencies?.nativeTargets ?? []),
|
|
245
256
|
...(collection.nativeTargets ?? []),
|
|
@@ -480,6 +491,60 @@ export async function prepareNitroCompileInput(
|
|
|
480
491
|
throw new Error(
|
|
481
492
|
`Nitro compilation needs the app's Xcode project to declare an iOS deployment target: ${options.projectRoot}`,
|
|
482
493
|
)
|
|
494
|
+
const reactProviders = (
|
|
495
|
+
await discoverTurboProviders(
|
|
496
|
+
options.appRoot ?? options.projectRoot,
|
|
497
|
+
options.projectRoot,
|
|
498
|
+
)
|
|
499
|
+
).filter(({ name }) => providerNames.has(name))
|
|
500
|
+
if (reactProviders.length > 0) {
|
|
501
|
+
const support = await collectTurboSources({
|
|
502
|
+
appRoot: options.appRoot ?? options.projectRoot,
|
|
503
|
+
projectRoot: options.projectRoot,
|
|
504
|
+
providers: reactProviders,
|
|
505
|
+
reactNativeRoot: collection.reactNative.root,
|
|
506
|
+
codegenDir: fs.mkdtempSync(path.join(os.tmpdir(), 'peach-nitro-react-')),
|
|
507
|
+
configuration: options.configuration,
|
|
508
|
+
installedPods: nativeLibraries,
|
|
509
|
+
})
|
|
510
|
+
const existing = new Set(collection.targets.map(({ name }) => name))
|
|
511
|
+
const repeated = support.targets.filter(({ name }) => existing.has(name))
|
|
512
|
+
for (const file of Object.keys(support.files)) {
|
|
513
|
+
if (repeated.some(({ path: root }) => file.startsWith(`${root}/`))) {
|
|
514
|
+
delete support.files[file]
|
|
515
|
+
continue
|
|
516
|
+
}
|
|
517
|
+
const target = support.targets.find(({ path: root }) => file.startsWith(`${root}/`))
|
|
518
|
+
if (!target) continue
|
|
519
|
+
if (
|
|
520
|
+
file.endsWith('/PeachTurboHost.mm') ||
|
|
521
|
+
file.endsWith('/PeachTurboHost.cpp') ||
|
|
522
|
+
file.endsWith('/ReactCodegen/RCTModuleProviders.mm') ||
|
|
523
|
+
file.endsWith('/ReactCommon/RCTTurboModuleManager.mm') ||
|
|
524
|
+
file.endsWith('/CoreModules/RCTDevMenuConfigurationDecorator.mm') ||
|
|
525
|
+
file.endsWith('/ReactCommon/jsi/jsi/jsi.cpp') ||
|
|
526
|
+
(isSwiftNativeTranslationUnit(file) &&
|
|
527
|
+
target.name !== TURBO_CORE_TARGET &&
|
|
528
|
+
target.name !== 'TurboFmt' &&
|
|
529
|
+
!file.includes('/upstream/ReactCodegen/'))
|
|
530
|
+
)
|
|
531
|
+
delete support.files[file]
|
|
532
|
+
}
|
|
533
|
+
support.targets = support.targets.filter(({ name }) => !existing.has(name))
|
|
534
|
+
support.loads = []
|
|
535
|
+
for (const target of support.targets)
|
|
536
|
+
if (target.name === TURBO_CORE_TARGET)
|
|
537
|
+
target.dependencies = [{ kind: 'target', name: 'JsiBridge' }]
|
|
538
|
+
dependencies = collectTurboCompileInput(
|
|
539
|
+
support,
|
|
540
|
+
null,
|
|
541
|
+
iosDeploymentTarget,
|
|
542
|
+
dependencies,
|
|
543
|
+
)
|
|
544
|
+
delete dependencies.files[dependencies.entry]
|
|
545
|
+
collection.files['Sources/NitroCore/PeachReactDispatch.mm'] =
|
|
546
|
+
'#import <Foundation/Foundation.h>\n#include "PeachNitroEntry.hpp"\nextern "C" void peachTurboDispatchAsync(dispatch_block_t block) { dispatch_block_t copied = [block copy]; peach::nitro::dispatchAsync([copied] { copied(); }); }\n'
|
|
547
|
+
}
|
|
483
548
|
const adapter = await resolveAdapterArchive(
|
|
484
549
|
'nitro',
|
|
485
550
|
{
|