peachsim 0.1.649 → 0.1.650
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/README.md +10 -9
- package/cli/command-registry.ts +2 -1
- package/cli/commands/guest-host.ts +67 -0
- package/cli/commands/kotlin.ts +231 -0
- package/cli/commands/project-report.ts +1 -1
- package/cli/commands/report-issue.ts +55 -32
- package/cli/commands/setup.ts +10 -14
- package/cli/commands/support.ts +399 -0
- package/cli/commands/swift.ts +6 -52
- package/cli/commands/telemetry.ts +10 -13
- package/cli/main.ts +22 -10
- package/cli/outbound-endpoints.ts +23 -2
- package/cli/privacy.ts +23 -25
- package/cli/runtime-notes.ts +3 -2
- package/cli/telemetry.ts +109 -14
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.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/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +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/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +3 -3
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +1 -1
- 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 +93 -28
- 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 +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.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 +15 -26
- package/dist-lib/swift-compile.cjs +6 -3
- package/dist-lib/swift-compile.mjs +6 -3
- 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.cjs +1 -1
- package/dist-lib/vite-swift.cjs +6 -3
- package/dist-lib/vite.cjs +1 -1
- package/kotlin/AppSources/android/app/Activity.kt +85 -0
- package/kotlin/AppSources/android/app/Application.kt +7 -0
- package/kotlin/AppSources/android/content/Context.kt +5 -0
- package/kotlin/AppSources/android/content/Intent.kt +16 -0
- package/kotlin/AppSources/android/os/Bundle.kt +5 -0
- package/kotlin/AppSources/android/util/SuperNotCalledException.kt +3 -0
- package/kotlin/AppSources/android/view/View.kt +72 -0
- package/kotlin/AppSources/android/view/Window.kt +44 -0
- package/kotlin/AppSources/android/widget/FrameLayout.kt +6 -0
- package/kotlin/AppSources/androidx/activity/ComponentActivity.kt +57 -0
- package/kotlin/AppSources/androidx/activity/compose/ComponentActivity.kt +29 -0
- package/kotlin/AppSources/androidx/compose/ui/platform/ComposeView.kt +67 -0
- package/kotlin/AppSources/dev/peach/app/PeachApp.kt +136 -0
- package/kotlin/AppSources/dev/peach/app/PeachWindowHost.kt +13 -0
- package/kotlin/ComposeSources/PeachComposeHost.kt +58 -37
- package/package.json +1 -1
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-setup/SKILL.md +2 -2
- package/src/{swift-guest.ts → guest-bundle.ts} +22 -7
- package/src/home-paths.ts +5 -3
- package/src/kotlin-app.ts +411 -0
- package/src/kotlin-host.ts +139 -32
- package/src/swift-compile.ts +7 -2
package/dist-lib/kotlin-host.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -34,6 +34,7 @@ var kotlin_host_exports = {};
|
|
|
34
34
|
__export(kotlin_host_exports, {
|
|
35
35
|
KOTLIN_ARTIFACT_PREFIX: () => KOTLIN_ARTIFACT_PREFIX,
|
|
36
36
|
KOTLIN_PACKAGE_PATH: () => KOTLIN_PACKAGE_PATH,
|
|
37
|
+
kotlinAppArtifact: () => kotlinAppArtifact,
|
|
37
38
|
kotlinArtifact: () => kotlinArtifact,
|
|
38
39
|
kotlinSources: () => kotlinSources,
|
|
39
40
|
peachKotlinModuleRoot: () => peachKotlinModuleRoot,
|
|
@@ -179,11 +180,11 @@ var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
|
179
180
|
"__tests__",
|
|
180
181
|
"scripts"
|
|
181
182
|
]);
|
|
182
|
-
function kotlinSources(root) {
|
|
183
|
+
function kotlinSources(root, skip = SKIP_DIRS) {
|
|
183
184
|
const sources = [];
|
|
184
185
|
const walk = (dir) => {
|
|
185
186
|
for (const entry of import_node_fs.default.readdirSync(dir, { withFileTypes: true })) {
|
|
186
|
-
if (entry.name.startsWith(".") ||
|
|
187
|
+
if (entry.name.startsWith(".") || skip.has(entry.name)) continue;
|
|
187
188
|
const full = import_node_path2.default.join(dir, entry.name);
|
|
188
189
|
if (entry.isDirectory()) walk(full);
|
|
189
190
|
else if (entry.isFile() && entry.name.endsWith(".kt")) sources.push(full);
|
|
@@ -235,7 +236,7 @@ function entrySource(ids) {
|
|
|
235
236
|
""
|
|
236
237
|
].join("\n");
|
|
237
238
|
}
|
|
238
|
-
var BUILD_FORMAT =
|
|
239
|
+
var BUILD_FORMAT = 7;
|
|
239
240
|
var builds = /* @__PURE__ */ new Map();
|
|
240
241
|
function buildsDir() {
|
|
241
242
|
return import_node_path2.default.join(kotlinHome(), "builds");
|
|
@@ -261,21 +262,72 @@ async function kotlinArtifact(root, moduleRoot, origin) {
|
|
|
261
262
|
generated[`OneNativeSource_${id}.kt`] = renderKotlinSourceGlue(id, contract).source;
|
|
262
263
|
}
|
|
263
264
|
generated["PeachEntry.kt"] = entrySource(ids);
|
|
264
|
-
if (viewIds.length > 0)
|
|
265
|
-
generated["PeachViews.kt"] = [
|
|
266
|
-
"import dev.onejs.one.OneNativeSourceViewDispatch",
|
|
267
|
-
"",
|
|
268
|
-
"fun peachViewDispatcher(source: String): OneNativeSourceViewDispatch = when (source) {",
|
|
269
|
-
...viewIds.map((id) => ` ${JSON.stringify(id)} -> OneNativeSourceViews_${id}()`),
|
|
270
|
-
' else -> error("composable source $source is not linked; rebuild the app")',
|
|
271
|
-
"}"
|
|
272
|
-
].join("\n");
|
|
273
|
-
}
|
|
265
|
+
if (viewIds.length > 0) generated["PeachViews.kt"] = viewsSource(viewIds);
|
|
274
266
|
const shims = kotlinSources(import_node_path2.default.join(moduleRoot, "Sources")).filter(
|
|
275
267
|
(file) => usesCompose || !file.endsWith("/OneNativeSourceViewDispatch.kt")
|
|
276
268
|
);
|
|
277
269
|
if (viewIds.length > 0)
|
|
278
270
|
shims.push(...kotlinSources(import_node_path2.default.join(moduleRoot, "ComposeSources")));
|
|
271
|
+
return compileKotlin(
|
|
272
|
+
{ root, toolchain, language, sources, generated, shims, usesCompose },
|
|
273
|
+
origin
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
function viewsSource(viewIds) {
|
|
277
|
+
return [
|
|
278
|
+
"import dev.onejs.one.OneNativeSourceViewDispatch",
|
|
279
|
+
"",
|
|
280
|
+
"fun peachViewDispatcher(source: String): OneNativeSourceViewDispatch = when (source) {",
|
|
281
|
+
...viewIds.map((id) => ` ${JSON.stringify(id)} -> OneNativeSourceViews_${id}()`),
|
|
282
|
+
' else -> error("composable source $source is not linked; rebuild the app")',
|
|
283
|
+
"}"
|
|
284
|
+
].join("\n");
|
|
285
|
+
}
|
|
286
|
+
async function kotlinAppArtifact(app, moduleRoot, origin) {
|
|
287
|
+
const toolchain = readToolchain(moduleRoot);
|
|
288
|
+
const kotlinString = (value) => JSON.stringify(value).replaceAll("$", "\\$");
|
|
289
|
+
const generated = {
|
|
290
|
+
"PeachEntry.kt": entrySource([]),
|
|
291
|
+
"PeachViews.kt": viewsSource([]),
|
|
292
|
+
"PeachAppEntry.kt": [
|
|
293
|
+
"@file:OptIn(kotlin.js.ExperimentalJsExport::class)",
|
|
294
|
+
"",
|
|
295
|
+
"@JsExport",
|
|
296
|
+
"fun peachAppMount(density: Float, fontScale: Float, locale: String, backend: String, stencilBits: Int,",
|
|
297
|
+
" regular: String, medium: String, bold: String, statusBar: Int, navigationBar: Int,",
|
|
298
|
+
" invalidate: (Boolean) -> Unit): String = dev.peach.app.peachStartApp(",
|
|
299
|
+
" dev.peach.app.PeachAppSpec(",
|
|
300
|
+
` android.content.ComponentName(${kotlinString(app.packageName)}, ${kotlinString(app.launcher.name)}),`,
|
|
301
|
+
` android.content.ComponentName(${kotlinString(app.packageName)}, ${kotlinString(app.launcher.targetClass)}),`,
|
|
302
|
+
` ${app.targetSdk}, ${app.optOutEdgeToEdge},`,
|
|
303
|
+
` { ${app.applicationClass ?? "android.app.Application"}() },`,
|
|
304
|
+
` { ${app.launcher.targetClass}() },`,
|
|
305
|
+
" ),",
|
|
306
|
+
" density, fontScale, locale, backend, stencilBits, regular, medium, bold, statusBar, navigationBar, invalidate,",
|
|
307
|
+
")",
|
|
308
|
+
""
|
|
309
|
+
].join("\n")
|
|
310
|
+
};
|
|
311
|
+
const shims = [
|
|
312
|
+
...kotlinSources(import_node_path2.default.join(moduleRoot, "Sources")),
|
|
313
|
+
...kotlinSources(import_node_path2.default.join(moduleRoot, "ComposeSources")),
|
|
314
|
+
...kotlinSources(import_node_path2.default.join(moduleRoot, "AppSources"), /* @__PURE__ */ new Set())
|
|
315
|
+
];
|
|
316
|
+
return compileKotlin(
|
|
317
|
+
{
|
|
318
|
+
root: app.projectDir,
|
|
319
|
+
toolchain,
|
|
320
|
+
language: app.language,
|
|
321
|
+
sources: app.sources,
|
|
322
|
+
generated,
|
|
323
|
+
shims,
|
|
324
|
+
usesCompose: true
|
|
325
|
+
},
|
|
326
|
+
origin
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
async function compileKotlin(input, origin) {
|
|
330
|
+
const { root, toolchain, language, sources, generated, shims, usesCompose } = input;
|
|
279
331
|
const digest = (0, import_node_crypto.createHash)("sha256");
|
|
280
332
|
digest.update(JSON.stringify({ format: BUILD_FORMAT, toolchain, language }));
|
|
281
333
|
for (const file of [...shims, ...sources])
|
|
@@ -404,21 +456,33 @@ async function kotlinArtifact(root, moduleRoot, origin) {
|
|
|
404
456
|
${output.trim() || (error instanceof Error ? error.message : String(error))}`
|
|
405
457
|
);
|
|
406
458
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
459
|
+
const seams = [
|
|
460
|
+
["process.release.name", "process.release?.name"]
|
|
461
|
+
];
|
|
462
|
+
const js = import_node_fs.default.readdirSync(import_node_path2.default.join(work, "js")).filter((file) => file.endsWith(".mjs"));
|
|
463
|
+
if (js.some(
|
|
464
|
+
(file) => import_node_fs.default.readFileSync(import_node_path2.default.join(work, "js", file), "utf8").includes("'kotlinx.coroutines.")
|
|
465
|
+
))
|
|
466
|
+
seams.push([
|
|
467
|
+
"(typeof(window) !== 'undefined' && window != null && typeof(window.addEventListener) === 'function') ? window : null",
|
|
468
|
+
"null"
|
|
469
|
+
]);
|
|
470
|
+
for (const [from, to] of seams) {
|
|
471
|
+
let patched = 0;
|
|
472
|
+
for (const file of js) {
|
|
473
|
+
const target = import_node_path2.default.join(work, "js", file);
|
|
474
|
+
const text = import_node_fs.default.readFileSync(target, "utf8");
|
|
475
|
+
const next = text.replaceAll(from, to);
|
|
476
|
+
if (next !== text) {
|
|
477
|
+
patched++;
|
|
478
|
+
import_node_fs.default.writeFileSync(target, next);
|
|
479
|
+
}
|
|
416
480
|
}
|
|
481
|
+
if (patched === 0)
|
|
482
|
+
throw new Error(
|
|
483
|
+
`kotlin output no longer contains ${from}; recheck how it detects its host in Peach`
|
|
484
|
+
);
|
|
417
485
|
}
|
|
418
|
-
if (patched === 0)
|
|
419
|
-
throw new Error(
|
|
420
|
-
"kotlin loader no longer reads process.release.name; recheck its node detection in Peach"
|
|
421
|
-
);
|
|
422
486
|
import_node_fs.default.renameSync(work, out);
|
|
423
487
|
return artifact;
|
|
424
488
|
})().finally(() => builds.delete(hash));
|
|
@@ -462,7 +526,7 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
462
526
|
if (pathname !== KOTLIN_PACKAGE_PATH) return false;
|
|
463
527
|
res.setHeader("access-control-allow-origin", "*");
|
|
464
528
|
try {
|
|
465
|
-
const artifact = await kotlinArtifact(app.root, app.moduleRoot, app.origin);
|
|
529
|
+
const artifact = app.project ? await kotlinAppArtifact(app.project, app.moduleRoot, app.origin) : await kotlinArtifact(app.root, app.moduleRoot, app.origin);
|
|
466
530
|
res.setHeader("content-type", "application/json");
|
|
467
531
|
res.end(JSON.stringify({ ...artifact, hmrPath: app.hmrPath }));
|
|
468
532
|
} catch (error) {
|
|
@@ -475,6 +539,7 @@ async function serveKotlinRequest(pathname, res, app) {
|
|
|
475
539
|
0 && (module.exports = {
|
|
476
540
|
KOTLIN_ARTIFACT_PREFIX,
|
|
477
541
|
KOTLIN_PACKAGE_PATH,
|
|
542
|
+
kotlinAppArtifact,
|
|
478
543
|
kotlinArtifact,
|
|
479
544
|
kotlinSources,
|
|
480
545
|
peachKotlinModuleRoot,
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -20650,8 +20650,8 @@ function readPrivacyPreferences() {
|
|
|
20650
20650
|
const productAnalytics = settings?.productAnalytics;
|
|
20651
20651
|
const crashReports = settings?.crashReports;
|
|
20652
20652
|
return {
|
|
20653
|
-
productAnalytics: typeof productAnalytics === "boolean" ? productAnalytics :
|
|
20654
|
-
crashReports: typeof crashReports === "boolean" ? crashReports :
|
|
20653
|
+
productAnalytics: typeof productAnalytics === "boolean" ? productAnalytics : true,
|
|
20654
|
+
crashReports: typeof crashReports === "boolean" ? crashReports : true,
|
|
20655
20655
|
configured: typeof productAnalytics === "boolean"
|
|
20656
20656
|
};
|
|
20657
20657
|
}
|
|
@@ -34708,33 +34708,19 @@ var init_env = __esm({
|
|
|
34708
34708
|
}
|
|
34709
34709
|
});
|
|
34710
34710
|
|
|
34711
|
-
// cli/ui.ts
|
|
34712
|
-
var init_ui = __esm({
|
|
34713
|
-
"cli/ui.ts"() {
|
|
34714
|
-
"use strict";
|
|
34715
|
-
}
|
|
34716
|
-
});
|
|
34717
|
-
|
|
34718
|
-
// cli/prompt.ts
|
|
34719
|
-
var init_prompt = __esm({
|
|
34720
|
-
"cli/prompt.ts"() {
|
|
34721
|
-
"use strict";
|
|
34722
|
-
init_ui();
|
|
34723
|
-
}
|
|
34724
|
-
});
|
|
34725
|
-
|
|
34726
34711
|
// cli/privacy.ts
|
|
34712
|
+
function doNotTrack() {
|
|
34713
|
+
const value = process.env.DO_NOT_TRACK;
|
|
34714
|
+
return value === "1" || value === "true";
|
|
34715
|
+
}
|
|
34727
34716
|
function diagnosticsAllowedForCurrentProcess(preferences = readPrivacyPreferences()) {
|
|
34728
|
-
|
|
34729
|
-
if (doNotTrack === "1" || doNotTrack === "true") return false;
|
|
34730
|
-
return preferences.configured && preferences.productAnalytics;
|
|
34717
|
+
return !doNotTrack() && preferences.productAnalytics;
|
|
34731
34718
|
}
|
|
34732
34719
|
var init_privacy = __esm({
|
|
34733
34720
|
"cli/privacy.ts"() {
|
|
34734
34721
|
"use strict";
|
|
34735
34722
|
init_home_paths();
|
|
34736
34723
|
init_env();
|
|
34737
|
-
init_prompt();
|
|
34738
34724
|
}
|
|
34739
34725
|
});
|
|
34740
34726
|
|
|
@@ -34769,6 +34755,7 @@ var init_command_registry = __esm({
|
|
|
34769
34755
|
"remote",
|
|
34770
34756
|
"preview",
|
|
34771
34757
|
"swift",
|
|
34758
|
+
"kotlin",
|
|
34772
34759
|
"box",
|
|
34773
34760
|
"list",
|
|
34774
34761
|
"use",
|
|
@@ -34776,7 +34763,7 @@ var init_command_registry = __esm({
|
|
|
34776
34763
|
"close",
|
|
34777
34764
|
"compat",
|
|
34778
34765
|
"project-report",
|
|
34779
|
-
"
|
|
34766
|
+
"support",
|
|
34780
34767
|
"desktop",
|
|
34781
34768
|
"login",
|
|
34782
34769
|
"logout",
|
|
@@ -34876,7 +34863,7 @@ var init_parse_args = __esm({
|
|
|
34876
34863
|
function sanitizeDiagnosticMessage(value) {
|
|
34877
34864
|
const firstLine = value.slice(0, 2048).split(/[\r\n\u2028\u2029]/, 1)[0] ?? "";
|
|
34878
34865
|
return firstLine.split((0, import_node_os3.homedir)()).join("<home>").replace(
|
|
34879
|
-
/<package:(?:@[\w.-]+\/)?[\w.-]+>|(?:https?:\/\/|file:\/\/|[A-Za-z]:[\\/]|<home>[\\/]|\/|\.{1,2}[\\/]|\b[\w.-]+[\\/])[^\s"'<>]+/g,
|
|
34866
|
+
/<package:(?:@[\w.-]+\/)?[\w.-]+>|(?:https?:\/\/|file:\/\/|[A-Za-z]:[\\/]|<home>[\\/]|\/|\.{1,2}[\\/]|\b[\w.-]+[\\/])(?:[^\s"'<>]|\s(?=[^"'<>]*[\\/]))+/g,
|
|
34880
34867
|
(location2) => {
|
|
34881
34868
|
if (location2.startsWith("<package:")) return location2;
|
|
34882
34869
|
const dependency = /(?:^|[\\/])node_modules[\\/]((?:@[^\\/]+[\\/])?[^\\/]+)/.exec(
|
|
@@ -34902,7 +34889,7 @@ function trackCliDiagnostic(diagnostic) {
|
|
|
34902
34889
|
if (queue.some((queued) => JSON.stringify(queued) === JSON.stringify(entry))) return;
|
|
34903
34890
|
queue.push(entry);
|
|
34904
34891
|
}
|
|
34905
|
-
var import_node_os3, observedRuntimeVersion, queue;
|
|
34892
|
+
var import_node_os3, observedRuntimeVersion, queue, CRASH_REPORT_EVERY_MS;
|
|
34906
34893
|
var init_telemetry = __esm({
|
|
34907
34894
|
"cli/telemetry.ts"() {
|
|
34908
34895
|
"use strict";
|
|
@@ -34913,6 +34900,7 @@ var init_telemetry = __esm({
|
|
|
34913
34900
|
init_privacy();
|
|
34914
34901
|
observedRuntimeVersion = null;
|
|
34915
34902
|
queue = [];
|
|
34903
|
+
CRASH_REPORT_EVERY_MS = 24 * 60 * 6e4;
|
|
34916
34904
|
}
|
|
34917
34905
|
});
|
|
34918
34906
|
|
|
@@ -35003,7 +34991,8 @@ function formatRuntimeReleaseNotes(version, entry) {
|
|
|
35003
34991
|
for (const section of entry.sections) {
|
|
35004
34992
|
lines.push(` ${section.title}:`);
|
|
35005
34993
|
for (const item of section.items) {
|
|
35006
|
-
|
|
34994
|
+
const reports = item.reports?.length ? ` (report ${item.reports.join(", ")})` : "";
|
|
34995
|
+
lines.push(` \u2022 ${item.summary}${reports}`);
|
|
35007
34996
|
}
|
|
35008
34997
|
}
|
|
35009
34998
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -562,6 +562,9 @@ var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAs
|
|
|
562
562
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
563
563
|
const targets = compileTargets(input);
|
|
564
564
|
const files = /* @__PURE__ */ new Map();
|
|
565
|
+
const moduleFiles = `
|
|
566
|
+
// sootsim-swift files ${(0, import_node_crypto2.createHash)("sha256").update(swiftModuleInputFiles(moduleRoot).join("\n")).digest("hex").slice(0, 16)}
|
|
567
|
+
`;
|
|
565
568
|
if (targets.length === 0) {
|
|
566
569
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
567
570
|
if (file === "Package.swift") continue;
|
|
@@ -582,7 +585,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
582
585
|
manifest = manifest.replace(product, `${product}
|
|
583
586
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
584
587
|
}
|
|
585
|
-
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest);
|
|
588
|
+
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
586
589
|
} else {
|
|
587
590
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
588
591
|
if (file === "Package.swift") continue;
|
|
@@ -609,7 +612,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
609
612
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
610
613
|
moduleRoot,
|
|
611
614
|
oneModule: input.oneModule
|
|
612
|
-
})
|
|
615
|
+
}) + moduleFiles
|
|
613
616
|
);
|
|
614
617
|
}
|
|
615
618
|
syncSwiftTree(layout.root, files);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import { execFile as execFile2 } from "node:child_process";
|
|
@@ -527,6 +527,9 @@ var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAs
|
|
|
527
527
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
528
528
|
const targets = compileTargets(input);
|
|
529
529
|
const files = /* @__PURE__ */ new Map();
|
|
530
|
+
const moduleFiles = `
|
|
531
|
+
// sootsim-swift files ${createHash2("sha256").update(swiftModuleInputFiles(moduleRoot).join("\n")).digest("hex").slice(0, 16)}
|
|
532
|
+
`;
|
|
530
533
|
if (targets.length === 0) {
|
|
531
534
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
532
535
|
if (file === "Package.swift") continue;
|
|
@@ -547,7 +550,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
547
550
|
manifest = manifest.replace(product, `${product}
|
|
548
551
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
549
552
|
}
|
|
550
|
-
files.set(path2.join(layout.root, "Package.swift"), manifest);
|
|
553
|
+
files.set(path2.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
551
554
|
} else {
|
|
552
555
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
553
556
|
if (file === "Package.swift") continue;
|
|
@@ -574,7 +577,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
574
577
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
575
578
|
moduleRoot,
|
|
576
579
|
oneModule: input.oneModule
|
|
577
|
-
})
|
|
580
|
+
}) + moduleFiles
|
|
578
581
|
);
|
|
579
582
|
}
|
|
580
583
|
syncSwiftTree(layout.root, files);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -583,6 +583,9 @@ var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAs
|
|
|
583
583
|
function writeSwiftProject(layout, input, moduleRoot) {
|
|
584
584
|
const targets = compileTargets(input);
|
|
585
585
|
const files = /* @__PURE__ */ new Map();
|
|
586
|
+
const moduleFiles = `
|
|
587
|
+
// sootsim-swift files ${(0, import_node_crypto2.createHash)("sha256").update(swiftModuleInputFiles(moduleRoot).join("\n")).digest("hex").slice(0, 16)}
|
|
588
|
+
`;
|
|
586
589
|
if (targets.length === 0) {
|
|
587
590
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
588
591
|
if (file === "Package.swift") continue;
|
|
@@ -603,7 +606,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
603
606
|
manifest = manifest.replace(product, `${product}
|
|
604
607
|
${ONE_PRODUCT},`).replace(flags, `${flags}${ONE_IMPLICIT_FLAGS}`);
|
|
605
608
|
}
|
|
606
|
-
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest);
|
|
609
|
+
files.set(import_node_path2.default.join(layout.root, "Package.swift"), manifest + moduleFiles);
|
|
607
610
|
} else {
|
|
608
611
|
for (const [file, contents] of Object.entries(input.files)) {
|
|
609
612
|
if (file === "Package.swift") continue;
|
|
@@ -630,7 +633,7 @@ function writeSwiftProject(layout, input, moduleRoot) {
|
|
|
630
633
|
siblings: swiftSiblingDependencies(input.files, targets),
|
|
631
634
|
moduleRoot,
|
|
632
635
|
oneModule: input.oneModule
|
|
633
|
-
})
|
|
636
|
+
}) + moduleFiles
|
|
634
637
|
);
|
|
635
638
|
}
|
|
636
639
|
syncSwiftTree(layout.root, files);
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.650 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
package android.app
|
|
2
|
+
|
|
3
|
+
import android.content.ComponentName
|
|
4
|
+
import android.content.ContextWrapper
|
|
5
|
+
import android.content.Intent
|
|
6
|
+
import android.os.Bundle
|
|
7
|
+
import android.util.SuperNotCalledException
|
|
8
|
+
import android.view.View
|
|
9
|
+
import android.view.ViewGroup
|
|
10
|
+
import android.view.Window
|
|
11
|
+
|
|
12
|
+
// the cold-start half of Activity: ActivityThread attaches it, then drives the
|
|
13
|
+
// perform calls in its own order. each lifecycle method must call through to
|
|
14
|
+
// super, as Activity.mCalled enforces, and the post callbacks run after it
|
|
15
|
+
// returns, where ActivityLifecycleCallbacks see them.
|
|
16
|
+
open class Activity : ContextWrapper() {
|
|
17
|
+
private var called = false
|
|
18
|
+
private var attachedIntent: Intent? = null
|
|
19
|
+
private var attachedApplication: Application? = null
|
|
20
|
+
private var attachedWindow: Window? = null
|
|
21
|
+
private var attachedComponent: ComponentName? = null
|
|
22
|
+
|
|
23
|
+
val intent: Intent get() = checkNotNull(attachedIntent)
|
|
24
|
+
val application: Application get() = checkNotNull(attachedApplication)
|
|
25
|
+
val window: Window get() = checkNotNull(attachedWindow)
|
|
26
|
+
|
|
27
|
+
// the activity class that runs; launched through an alias, the intent
|
|
28
|
+
// still names the alias
|
|
29
|
+
val componentName: ComponentName get() = checkNotNull(attachedComponent)
|
|
30
|
+
|
|
31
|
+
internal fun attach(application: Application, component: ComponentName, intent: Intent, window: Window) {
|
|
32
|
+
attachedApplication = application
|
|
33
|
+
attachedComponent = component
|
|
34
|
+
attachedIntent = intent
|
|
35
|
+
attachedWindow = window
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
open fun setContentView(view: View) {
|
|
39
|
+
setContentView(view, ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT))
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
open fun setContentView(view: View, params: ViewGroup.LayoutParams) {
|
|
43
|
+
window.setContentView(view, params)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
protected open fun onCreate(savedInstanceState: Bundle?) { called = true }
|
|
47
|
+
protected open fun onStart() { called = true }
|
|
48
|
+
protected open fun onPostCreate(savedInstanceState: Bundle?) { called = true }
|
|
49
|
+
protected open fun onResume() { called = true }
|
|
50
|
+
protected open fun onPostResume() { called = true }
|
|
51
|
+
|
|
52
|
+
// ActivityLifecycleCallbacks' post events; ComponentActivity's lifecycle
|
|
53
|
+
// moves on these, as its ReportFragment does from API 29.
|
|
54
|
+
internal open fun dispatchActivityPostCreated() {}
|
|
55
|
+
internal open fun dispatchActivityPostStarted() {}
|
|
56
|
+
internal open fun dispatchActivityPostResumed() {}
|
|
57
|
+
|
|
58
|
+
private fun require(method: String, call: () -> Unit) {
|
|
59
|
+
called = false
|
|
60
|
+
call()
|
|
61
|
+
if (!called) throw SuperNotCalledException(
|
|
62
|
+
"Activity {${componentName.flattenToShortString()}} did not call through to super.$method()"
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
internal fun performCreate(icicle: Bundle?) {
|
|
67
|
+
require("onCreate") { onCreate(icicle) }
|
|
68
|
+
dispatchActivityPostCreated()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
internal fun performStart() {
|
|
72
|
+
require("onStart") { onStart() }
|
|
73
|
+
dispatchActivityPostStarted()
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
internal fun performPostCreate(icicle: Bundle?) {
|
|
77
|
+
require("onPostCreate") { onPostCreate(icicle) }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
internal fun performResume() {
|
|
81
|
+
require("onResume") { onResume() }
|
|
82
|
+
require("onPostResume") { onPostResume() }
|
|
83
|
+
dispatchActivityPostResumed()
|
|
84
|
+
}
|
|
85
|
+
}
|