stim 0.0.0 → 1.1.0
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/LICENSE +21 -0
- package/README.md +162 -0
- package/dist/android-CC5bUer7.mjs +204 -0
- package/dist/android-DnZlT3aU.mjs +2279 -0
- package/dist/android-cas-DGlTStWu.mjs +1078 -0
- package/dist/android-cas-compiler.d.mts +1 -0
- package/dist/android-cas-compiler.mjs +71 -0
- package/dist/android-xmyGBNy5.mjs +665 -0
- package/dist/app-install-oZIQRbdD.mjs +1141 -0
- package/dist/build-lock-vE45ZzJZ.mjs +645 -0
- package/dist/build-slots-CgacA9zQ.mjs +152 -0
- package/dist/cache-manifest-oeH18ERr.mjs +66 -0
- package/dist/cache-manifest.d.mts +27 -0
- package/dist/cache-manifest.mjs +2 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +40 -0
- package/dist/collector-run.d.mts +119 -0
- package/dist/collector-run.mjs +541 -0
- package/dist/command-output-8wHMEde0.mjs +289 -0
- package/dist/config-D7uu8Gbq.mjs +381 -0
- package/dist/deps-64wVnpZc.mjs +435 -0
- package/dist/dev-client-Bvky1hya.mjs +557 -0
- package/dist/device-DJKv5Qej.mjs +250 -0
- package/dist/device-lease-D-G3SgVe.mjs +335 -0
- package/dist/device-pool-BlHXnYYs.mjs +408 -0
- package/dist/device-remote-CCgkG82J.mjs +1209 -0
- package/dist/doctor-BRF9aAJ3.mjs +530 -0
- package/dist/doctor-DlVxTtMq.mjs +1137 -0
- package/dist/error-diagnostics-B5IJwv3-.mjs +636 -0
- package/dist/errors-B6W7FkxQ.mjs +15 -0
- package/dist/exec-bsN9MJXb.mjs +63 -0
- package/dist/gc-DhXdgSdt.mjs +1651 -0
- package/dist/guide-DrhrDBo5.mjs +4319 -0
- package/dist/ios-BZxKPuqP.mjs +382 -0
- package/dist/ios-CK1Vrk6Q.mjs +2721 -0
- package/dist/ios-device-CYbuRNXR.mjs +81 -0
- package/dist/ios-device-CdSm0GDw.mjs +413 -0
- package/dist/logs-Dxoy16Qv.mjs +176 -0
- package/dist/logs-query-oqn47Ffx.mjs +273 -0
- package/dist/metro-B01H3EuD.mjs +184 -0
- package/dist/metro-store-CDDZHtPl.mjs +92 -0
- package/dist/ndjson-DcAtEx_K.mjs +131 -0
- package/dist/ndjson-DvHSsNU9.d.mts +16 -0
- package/dist/ownership-B9QIdQOw.mjs +475 -0
- package/dist/ownership-D8HmSv2E.mjs +60 -0
- package/dist/ownership-claim-CeJLEpjD.mjs +569 -0
- package/dist/process-output-C7IlIzd7.mjs +40 -0
- package/dist/project-COj6nzzh.mjs +243 -0
- package/dist/reclaim-BPvN2HlP.mjs +347 -0
- package/dist/reload-DYZEBbZy.mjs +332 -0
- package/dist/remote-cache-DOi5-zLj.mjs +934 -0
- package/dist/server-bare-BYHqEeyw.mjs +352 -0
- package/dist/server-expo-BEMr_m6p.mjs +312 -0
- package/dist/server-expo-rb0k-0w7.mjs +2 -0
- package/dist/settings-BSwrY4FZ.mjs +687 -0
- package/dist/spawn-entry-nCE6m770.mjs +14 -0
- package/dist/start-ByCylYtB.mjs +822 -0
- package/dist/state-IYEY-zi8.mjs +268 -0
- package/dist/stats-DZ4Q5J-7.mjs +62 -0
- package/dist/stats-wqxPm7Tv.mjs +307 -0
- package/dist/status-Dia0XTqG.mjs +363 -0
- package/dist/stop-BApyaF21.mjs +591 -0
- package/dist/stop-D6o5zAdm.mjs +3 -0
- package/dist/supervisor-run.d.mts +84 -0
- package/dist/supervisor-run.mjs +210 -0
- package/dist/workspace-process-lock-CxOO9-pf.mjs +47 -0
- package/dist/worktree-Dx3ZC5lS.mjs +539 -0
- package/dist/worktree-DxEmUI_n.mjs +1322 -0
- package/dist/xcode-CDB6fytw.mjs +1705 -0
- package/package.json +61 -8
- package/shim/android-cas-pch.cmake +35 -0
- package/shim/android-cas.gradle +29 -0
- package/shim/android-cas.toolchain.cmake +12 -0
- package/shim/android-optimizations.gradle +30 -0
- package/shim/bundle-response.cjs +46 -0
- package/shim/bundle-response.d.cts +5 -0
- package/shim/expo-metro-config.cjs +188 -0
- package/shim/metro-cache-generation.cjs +20 -0
- package/shim/metro-cache-generation.d.cts +5 -0
- package/skill/SKILL.md +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { t as getExecutor } from "./exec-bsN9MJXb.mjs";
|
|
3
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { once } from "node:events";
|
|
7
|
+
//#region bin/android-cas-compiler.ts
|
|
8
|
+
const context = process.env.STIM_ANDROID_CAS_CONTEXT;
|
|
9
|
+
if (!context) throw new Error("Missing STIM_ANDROID_CAS_CONTEXT. Run this build through stim android.");
|
|
10
|
+
const config = JSON.parse(readFileSync(context, "utf8"));
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
const cxx = process.argv[1].endsWith("++");
|
|
13
|
+
const compiler = cxx ? config.clangxx : config.clang;
|
|
14
|
+
const extra = ["-resource-dir", config.resourceDir];
|
|
15
|
+
if (cxx) extra.push("-nostdinc++", "-isystem", join(config.ndk, "toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1"));
|
|
16
|
+
if (!args.some((arg) => [
|
|
17
|
+
"-c",
|
|
18
|
+
"-E",
|
|
19
|
+
"-S"
|
|
20
|
+
].includes(arg))) extra.push(`--ld-path=${config.lld}`);
|
|
21
|
+
if (args.includes("-c")) {
|
|
22
|
+
const cwd = process.cwd();
|
|
23
|
+
const overlays = join(config.state, "vfs");
|
|
24
|
+
mkdirSync(overlays, { recursive: true });
|
|
25
|
+
const overlay = join(overlays, `${createHash("sha256").update(cwd).digest("hex")}.json`);
|
|
26
|
+
if (!existsSync(overlay)) {
|
|
27
|
+
const temporary = `${overlay}.${randomUUID()}.tmp`;
|
|
28
|
+
writeFileSync(temporary, JSON.stringify({
|
|
29
|
+
version: 0,
|
|
30
|
+
"use-external-names": false,
|
|
31
|
+
roots: [{
|
|
32
|
+
type: "directory-remap",
|
|
33
|
+
name: "/^src",
|
|
34
|
+
"external-contents": config.source
|
|
35
|
+
}, {
|
|
36
|
+
type: "directory-remap",
|
|
37
|
+
name: "/^build",
|
|
38
|
+
"external-contents": cwd
|
|
39
|
+
}]
|
|
40
|
+
}));
|
|
41
|
+
renameSync(temporary, overlay);
|
|
42
|
+
}
|
|
43
|
+
extra.push("-ivfsoverlay", overlay, "-fdepscan=inline", "-fdepscan-include-tree", "-Xclang", "-fcas-path", "-Xclang", config.cache, "-Rcompile-job-cache", `-fdepscan-prefix-map=${config.source}=/^src`, `-fdepscan-prefix-map=${cwd}=/^build`, `-fdepscan-prefix-map=${config.state}=/^state`);
|
|
44
|
+
}
|
|
45
|
+
const started = performance.now();
|
|
46
|
+
const child = getExecutor().spawn(compiler, [...extra, ...args], { stdio: [
|
|
47
|
+
"inherit",
|
|
48
|
+
"pipe",
|
|
49
|
+
"pipe"
|
|
50
|
+
] });
|
|
51
|
+
let stderr = "";
|
|
52
|
+
child.stdout.on("data", (chunk) => process.stdout.write(chunk));
|
|
53
|
+
child.stderr.on("data", (chunk) => {
|
|
54
|
+
stderr += chunk.toString();
|
|
55
|
+
process.stderr.write(chunk);
|
|
56
|
+
});
|
|
57
|
+
const [code] = await once(child, "close");
|
|
58
|
+
appendFileSync(join(config.state, "compiler.jsonl"), `${JSON.stringify({
|
|
59
|
+
argv: [
|
|
60
|
+
compiler,
|
|
61
|
+
...extra,
|
|
62
|
+
...args
|
|
63
|
+
],
|
|
64
|
+
cwd: process.cwd(),
|
|
65
|
+
code,
|
|
66
|
+
seconds: (performance.now() - started) / 1e3,
|
|
67
|
+
stderr
|
|
68
|
+
})}\n`);
|
|
69
|
+
process.exitCode = code ?? 1;
|
|
70
|
+
//#endregion
|
|
71
|
+
export {};
|