zcode-app-cli 3.3.5-1
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 +24 -0
- package/README.md +642 -0
- package/bin/zcode.js +848 -0
- package/config.example.json +110 -0
- package/package.json +81 -0
- package/vendor/.node-bundle-meta.json +6 -0
- package/vendor/extraction.json +11 -0
- package/vendor/node_modules/@zcode/tui/dist/index.js +161875 -0
- package/vendor/node_modules/@zcode/tui/package.json +14 -0
- package/vendor/packages/android-emulator-plugin/.mcp.json +19 -0
- package/vendor/packages/android-emulator-plugin/.zcode-plugin/plugin.json +63 -0
- package/vendor/packages/android-emulator-plugin/README.md +134 -0
- package/vendor/packages/android-emulator-plugin/commands/android-dev.md +11 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/path.d.ts +4 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/path.js +17 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/result.d.ts +5 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/result.js +22 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/run.d.ts +18 -0
- package/vendor/packages/android-emulator-plugin/dist/lib/run.js +99 -0
- package/vendor/packages/android-emulator-plugin/dist/mcp/server.d.ts +3 -0
- package/vendor/packages/android-emulator-plugin/dist/mcp/server.js +47607 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/app.d.ts +39 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/app.js +50 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/avd.d.ts +37 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/avd.js +185 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/build.d.ts +68 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/build.js +131 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/config.d.ts +7 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/config.js +29 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/device.d.ts +20 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/device.js +91 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/logs.d.ts +15 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/logs.js +31 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/preflight.d.ts +15 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/preflight.js +123 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project-template.d.ts +13 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project-template.js +211 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project.d.ts +33 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/project.js +195 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.d.ts +14 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/screenshot.js +73 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/sdk.d.ts +14 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/sdk.js +185 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/ui.d.ts +92 -0
- package/vendor/packages/android-emulator-plugin/dist/providers/ui.js +146 -0
- package/vendor/packages/android-emulator-plugin/hooks/hooks.json +3 -0
- package/vendor/packages/android-emulator-plugin/package.json +35 -0
- package/vendor/packages/android-emulator-plugin/skills/android-dev/INSTALL_ENVIRONMENT.md +357 -0
- package/vendor/packages/android-emulator-plugin/skills/android-dev/SKILL.md +73 -0
- package/vendor/packages/android-emulator-plugin/templates/compose-app/README.md +5 -0
- package/vendor/packages/document-skills-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/document-skills-plugin/package.json +8 -0
- package/vendor/packages/document-skills-plugin/skills/docx/LICENSE.txt +13 -0
- package/vendor/packages/document-skills-plugin/skills/docx/SKILL.md +201 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/chart-templates.md +386 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/common-rules.md +419 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/decorations.md +537 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/design-system.md +1797 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-advanced.md +257 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/docx-js-core.md +332 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/faq.md +323 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/math-formulas.md +276 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/ooxml.md +222 -0
- package/vendor/packages/document-skills-plugin/skills/docx/references/toc.md +264 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/comment.md +88 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/create.md +207 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/edit.md +115 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/format.md +120 -0
- package/vendor/packages/document-skills-plugin/skills/docx/routes/read.md +114 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/academic.md +783 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/contract.md +463 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/copywriting.md +139 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/exam.md +698 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/official-doc.md +411 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/report.md +340 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scenes/resume.md +534 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/__init__.py +1 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/add_toc_placeholders.py +749 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/document.py +1333 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/postcheck.py +807 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/comments.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/templates/people.xml +3 -0
- package/vendor/packages/document-skills-plugin/skills/docx/scripts/utilities.py +374 -0
- package/vendor/packages/document-skills-plugin/skills/docx/setup.sh +177 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/LICENSE.txt +13 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/SKILL.md +919 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/academic.md +1058 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/creative.md +770 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/poster.md +702 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process-advanced.md +284 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/process.md +319 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/briefs/report.md +1659 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/components.md +153 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/fonts.md +93 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/configs/visual_framework.md +263 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-academic.tex +130 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/references/resume-altacv.tex +190 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/cover_validate.js +367 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/design_engine.py +2816 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2pdf-next.js +754 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/html2poster.js +256 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf.py +2959 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/pdf_qa.py +901 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/poster_validate.py +1337 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/setup.sh +269 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/scripts/toc_validate.py +2075 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/charts.md +320 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover-backgrounds.md +384 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/cover.md +1442 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/fill-engine.md +527 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/geometry.md +142 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/overflow.md +630 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/pagination.md +367 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/palette.md +217 -0
- package/vendor/packages/document-skills-plugin/skills/pdf/typesetting/typography.md +20 -0
- package/vendor/packages/ios-simulator-plugin/.mcp.json +15 -0
- package/vendor/packages/ios-simulator-plugin/.zcode-plugin/plugin.json +34 -0
- package/vendor/packages/ios-simulator-plugin/README.md +111 -0
- package/vendor/packages/ios-simulator-plugin/commands/ios-dev.md +11 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/path.d.ts +4 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/path.js +18 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/result.d.ts +5 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/result.js +20 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/run.d.ts +17 -0
- package/vendor/packages/ios-simulator-plugin/dist/lib/run.js +83 -0
- package/vendor/packages/ios-simulator-plugin/dist/mcp/server.d.ts +3 -0
- package/vendor/packages/ios-simulator-plugin/dist/mcp/server.js +46833 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/build.d.ts +112 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/build.js +99 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/logs.d.ts +21 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/logs.js +26 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.d.ts +12 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/preflight.js +62 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/project.d.ts +35 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/project.js +288 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.d.ts +22 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/screenshot.js +30 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/sim.d.ts +60 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/sim.js +116 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/ui.d.ts +57 -0
- package/vendor/packages/ios-simulator-plugin/dist/providers/ui.js +67 -0
- package/vendor/packages/ios-simulator-plugin/hooks/hooks.json +3 -0
- package/vendor/packages/ios-simulator-plugin/package.json +35 -0
- package/vendor/packages/ios-simulator-plugin/skills/ios-dev/SKILL.md +45 -0
- package/vendor/packages/ios-simulator-plugin/templates/swiftui-app/README.md +5 -0
- package/vendor/packages/restore-legacy-sessions-plugin/.zcode-plugin/plugin.json +9 -0
- package/vendor/packages/restore-legacy-sessions-plugin/README.md +35 -0
- package/vendor/packages/restore-legacy-sessions-plugin/commands/restore-legacy-sessions.md +11 -0
- package/vendor/packages/restore-legacy-sessions-plugin/package.json +8 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/SKILL.md +92 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/restore-conversation.mjs +648 -0
- package/vendor/packages/restore-legacy-sessions-plugin/skills/restore-legacy-sessions/scripts/scan-legacy-sessions.mjs +422 -0
- package/vendor/packages/skill-creator-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/skill-creator-plugin/package.json +8 -0
- package/vendor/packages/skill-creator-plugin/skills/skill-creator/SKILL.md +159 -0
- package/vendor/packages/zcode-guide-plugin/.zcode-plugin/plugin.json +8 -0
- package/vendor/packages/zcode-guide-plugin/README.md +22 -0
- package/vendor/packages/zcode-guide-plugin/package.json +8 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-commands/SKILL.md +66 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-hooks/SKILL.md +66 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-mcp/SKILL.md +97 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-plugins/SKILL.md +59 -0
- package/vendor/packages/zcode-guide-plugin/skills/diagnosing-skills/SKILL.md +61 -0
- package/vendor/packages/zcode-guide-plugin/skills/zcode-configuration-guide/SKILL.md +99 -0
- package/vendor/zcode.cjs +2926 -0
- package/zcode-runtime.lock.json +8 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
type Build = {
|
|
2
|
+
project?: string;
|
|
3
|
+
workspace?: string;
|
|
4
|
+
scheme?: string;
|
|
5
|
+
configuration?: string;
|
|
6
|
+
device?: string;
|
|
7
|
+
udid?: string;
|
|
8
|
+
runtime?: string;
|
|
9
|
+
derivedDataPath?: string;
|
|
10
|
+
bundleId?: string;
|
|
11
|
+
openSimulator?: boolean;
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
};
|
|
14
|
+
type RunApp = Build & {
|
|
15
|
+
launchArgs?: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function app(input?: Build): Promise<{
|
|
18
|
+
ok: boolean;
|
|
19
|
+
source: {
|
|
20
|
+
flag: "-workspace";
|
|
21
|
+
file: string;
|
|
22
|
+
scheme: string | undefined;
|
|
23
|
+
} | {
|
|
24
|
+
flag: "-project";
|
|
25
|
+
file: string;
|
|
26
|
+
scheme: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
simulator: {
|
|
29
|
+
opened: boolean;
|
|
30
|
+
name: string;
|
|
31
|
+
udid: string;
|
|
32
|
+
state: string;
|
|
33
|
+
runtime: string;
|
|
34
|
+
available: boolean;
|
|
35
|
+
};
|
|
36
|
+
derivedDataPath: string;
|
|
37
|
+
appPath: string | undefined;
|
|
38
|
+
bundleId: string | undefined;
|
|
39
|
+
logPath: string;
|
|
40
|
+
code: number;
|
|
41
|
+
timedOut: boolean;
|
|
42
|
+
output: string;
|
|
43
|
+
}>;
|
|
44
|
+
export declare function runApp(input?: RunApp): Promise<{
|
|
45
|
+
installed: boolean;
|
|
46
|
+
launched: boolean;
|
|
47
|
+
ok: boolean;
|
|
48
|
+
source: {
|
|
49
|
+
flag: "-workspace";
|
|
50
|
+
file: string;
|
|
51
|
+
scheme: string | undefined;
|
|
52
|
+
} | {
|
|
53
|
+
flag: "-project";
|
|
54
|
+
file: string;
|
|
55
|
+
scheme: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
simulator: {
|
|
58
|
+
opened: boolean;
|
|
59
|
+
name: string;
|
|
60
|
+
udid: string;
|
|
61
|
+
state: string;
|
|
62
|
+
runtime: string;
|
|
63
|
+
available: boolean;
|
|
64
|
+
};
|
|
65
|
+
derivedDataPath: string;
|
|
66
|
+
appPath: string | undefined;
|
|
67
|
+
bundleId: string | undefined;
|
|
68
|
+
logPath: string;
|
|
69
|
+
code: number;
|
|
70
|
+
timedOut: boolean;
|
|
71
|
+
output: string;
|
|
72
|
+
} | {
|
|
73
|
+
installed: {
|
|
74
|
+
installed: boolean;
|
|
75
|
+
udid: string;
|
|
76
|
+
app: string;
|
|
77
|
+
};
|
|
78
|
+
launched: {
|
|
79
|
+
launched: boolean;
|
|
80
|
+
udid: string;
|
|
81
|
+
bundle: string;
|
|
82
|
+
output: string;
|
|
83
|
+
};
|
|
84
|
+
ok: boolean;
|
|
85
|
+
source: {
|
|
86
|
+
flag: "-workspace";
|
|
87
|
+
file: string;
|
|
88
|
+
scheme: string | undefined;
|
|
89
|
+
} | {
|
|
90
|
+
flag: "-project";
|
|
91
|
+
file: string;
|
|
92
|
+
scheme: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
simulator: {
|
|
95
|
+
opened: boolean;
|
|
96
|
+
name: string;
|
|
97
|
+
udid: string;
|
|
98
|
+
state: string;
|
|
99
|
+
runtime: string;
|
|
100
|
+
available: boolean;
|
|
101
|
+
};
|
|
102
|
+
derivedDataPath: string;
|
|
103
|
+
appPath: string | undefined;
|
|
104
|
+
bundleId: string | undefined;
|
|
105
|
+
logPath: string;
|
|
106
|
+
code: number;
|
|
107
|
+
timedOut: boolean;
|
|
108
|
+
output: string;
|
|
109
|
+
}>;
|
|
110
|
+
export declare function pickAppProduct(hits: string[], config: string): string | undefined;
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { mkdir, readdir, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { data, inside, rel } from "../lib/path.js";
|
|
5
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
6
|
+
import { boot, install, launch } from "./sim.js";
|
|
7
|
+
import { bundle, discover, source } from "./project.js";
|
|
8
|
+
export async function app(input = {}) {
|
|
9
|
+
const found = await discover();
|
|
10
|
+
const src = source(input, found);
|
|
11
|
+
if (!src.scheme)
|
|
12
|
+
throw new Error("No scheme found. Pass scheme explicitly.");
|
|
13
|
+
const sim = await boot({
|
|
14
|
+
udid: input.udid,
|
|
15
|
+
name: input.device,
|
|
16
|
+
runtime: input.runtime,
|
|
17
|
+
open: input.openSimulator,
|
|
18
|
+
});
|
|
19
|
+
const dir = input.derivedDataPath
|
|
20
|
+
? inside(process.cwd(), input.derivedDataPath)
|
|
21
|
+
: path.join(await data("DerivedData"), key(`${process.cwd()}:${src.file}:${src.scheme}`));
|
|
22
|
+
await mkdir(dir, { recursive: true });
|
|
23
|
+
const config = input.configuration || "Debug";
|
|
24
|
+
const out = await run([
|
|
25
|
+
"xcodebuild",
|
|
26
|
+
src.flag,
|
|
27
|
+
src.file,
|
|
28
|
+
"-scheme",
|
|
29
|
+
src.scheme,
|
|
30
|
+
"-configuration",
|
|
31
|
+
config,
|
|
32
|
+
"-destination",
|
|
33
|
+
`platform=iOS Simulator,id=${sim.udid}`,
|
|
34
|
+
"-derivedDataPath",
|
|
35
|
+
dir,
|
|
36
|
+
"CODE_SIGNING_ALLOWED=NO",
|
|
37
|
+
"build",
|
|
38
|
+
], { timeout: input.timeoutMs ?? 600_000 });
|
|
39
|
+
const log = await record("build", out);
|
|
40
|
+
const id = input.bundleId || (await bundle(src.flag, src.file, src.scheme).catch(() => undefined));
|
|
41
|
+
const prod = ok(out) ? await find(dir, config) : undefined;
|
|
42
|
+
return {
|
|
43
|
+
ok: ok(out),
|
|
44
|
+
source: src,
|
|
45
|
+
simulator: sim,
|
|
46
|
+
derivedDataPath: dir,
|
|
47
|
+
appPath: prod,
|
|
48
|
+
bundleId: id,
|
|
49
|
+
logPath: log,
|
|
50
|
+
code: out.code,
|
|
51
|
+
timedOut: out.timed,
|
|
52
|
+
output: brief(out, 12_000),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export async function runApp(input = {}) {
|
|
56
|
+
const built = await app({ ...input, openSimulator: input.openSimulator ?? true });
|
|
57
|
+
if (!built.ok)
|
|
58
|
+
return { ...built, installed: false, launched: false };
|
|
59
|
+
if (!built.appPath)
|
|
60
|
+
throw new Error("Build succeeded, but no .app product was found in DerivedData.");
|
|
61
|
+
if (!built.bundleId)
|
|
62
|
+
throw new Error("Build succeeded, but PRODUCT_BUNDLE_IDENTIFIER could not be resolved.");
|
|
63
|
+
const installed = await install(built.simulator.udid, built.appPath);
|
|
64
|
+
const launched = await launch(built.simulator.udid, built.bundleId, input.launchArgs ?? []);
|
|
65
|
+
return { ...built, installed, launched };
|
|
66
|
+
}
|
|
67
|
+
async function record(name, out) {
|
|
68
|
+
const dir = await data("logs");
|
|
69
|
+
const file = path.join(dir, `${stamp()}-${name}.log`);
|
|
70
|
+
await writeFile(file, [`$ ${out.cmd.join(" ")}`, `exit=${out.code}`, `timedOut=${out.timed}`, "", out.stdout, out.stderr].join("\n"), "utf8");
|
|
71
|
+
return rel(file);
|
|
72
|
+
}
|
|
73
|
+
async function find(dir, config) {
|
|
74
|
+
return pickAppProduct(await apps(dir, 8), config);
|
|
75
|
+
}
|
|
76
|
+
export function pickAppProduct(hits, config) {
|
|
77
|
+
return (hits.find((item) => item.includes(`${path.sep}${config}-iphonesimulator${path.sep}`)) ||
|
|
78
|
+
hits.find((item) => item.includes(`${path.sep}Debug-iphonesimulator${path.sep}`)) ||
|
|
79
|
+
hits[0]);
|
|
80
|
+
}
|
|
81
|
+
async function apps(dir, depth) {
|
|
82
|
+
if (depth < 0)
|
|
83
|
+
return [];
|
|
84
|
+
const items = await readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
85
|
+
return (await Promise.all(items.map(async (item) => {
|
|
86
|
+
const file = path.join(dir, item.name);
|
|
87
|
+
if (item.isDirectory() && item.name.endsWith(".app"))
|
|
88
|
+
return [file];
|
|
89
|
+
if (item.isDirectory())
|
|
90
|
+
return apps(file, depth - 1);
|
|
91
|
+
return [];
|
|
92
|
+
}))).flat();
|
|
93
|
+
}
|
|
94
|
+
function key(value) {
|
|
95
|
+
return createHash("sha1").update(value).digest("hex").slice(0, 16);
|
|
96
|
+
}
|
|
97
|
+
function stamp() {
|
|
98
|
+
return new Date().toISOString().replaceAll(/[:.]/g, "-");
|
|
99
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Logs = {
|
|
2
|
+
udid?: string;
|
|
3
|
+
device?: string;
|
|
4
|
+
runtime?: string;
|
|
5
|
+
bundleId?: string;
|
|
6
|
+
seconds?: number;
|
|
7
|
+
limit?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function logs(input?: Logs): Promise<{
|
|
10
|
+
simulator: {
|
|
11
|
+
name: string;
|
|
12
|
+
udid: string;
|
|
13
|
+
state: string;
|
|
14
|
+
runtime: string;
|
|
15
|
+
available: boolean;
|
|
16
|
+
};
|
|
17
|
+
seconds: number;
|
|
18
|
+
output: string;
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
2
|
+
import { pick } from "./sim.js";
|
|
3
|
+
const ID = /^[A-Za-z0-9_.-]+$/;
|
|
4
|
+
export async function logs(input = {}) {
|
|
5
|
+
const sim = await pick({ udid: input.udid, name: input.device, runtime: input.runtime });
|
|
6
|
+
const secs = Math.max(1, Math.min(input.seconds ?? 120, 3600));
|
|
7
|
+
const args = ["xcrun", "simctl", "spawn", sim.udid, "log", "show", "--style", "compact", "--last", `${secs}s`];
|
|
8
|
+
if (input.bundleId) {
|
|
9
|
+
if (!ID.test(input.bundleId))
|
|
10
|
+
throw new Error(`Invalid bundle id: ${input.bundleId}`);
|
|
11
|
+
args.push("--predicate", `subsystem CONTAINS "${input.bundleId}" OR process CONTAINS "${input.bundleId.split(".").at(-1)}"`);
|
|
12
|
+
}
|
|
13
|
+
const out = await run(args, { timeout: 60_000 });
|
|
14
|
+
if (!ok(out))
|
|
15
|
+
throw new Error(brief(out));
|
|
16
|
+
return {
|
|
17
|
+
simulator: sim,
|
|
18
|
+
seconds: secs,
|
|
19
|
+
output: text(out.stdout, input.limit ?? 20_000),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function text(value, limit) {
|
|
23
|
+
if (value.length <= limit)
|
|
24
|
+
return value;
|
|
25
|
+
return value.slice(0, limit) + "\n...[truncated]";
|
|
26
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { brief, ok, run } from "../lib/run.js";
|
|
2
|
+
import { parseSimulators } from "./sim.js";
|
|
3
|
+
export async function preflight() {
|
|
4
|
+
const checks = [];
|
|
5
|
+
checks.push({
|
|
6
|
+
name: "macOS",
|
|
7
|
+
ok: process.platform === "darwin",
|
|
8
|
+
detail: process.platform,
|
|
9
|
+
fix: "Run this plugin on macOS with full Xcode installed.",
|
|
10
|
+
});
|
|
11
|
+
const select = await run(["xcode-select", "-p"], { timeout: 10_000 });
|
|
12
|
+
const dir = select.stdout.trim();
|
|
13
|
+
const clt = dir.includes("/CommandLineTools");
|
|
14
|
+
checks.push({
|
|
15
|
+
name: "xcode-select",
|
|
16
|
+
ok: ok(select) && !clt,
|
|
17
|
+
detail: ok(select) ? dir : brief(select),
|
|
18
|
+
fix: "Install full Xcode, then run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer",
|
|
19
|
+
});
|
|
20
|
+
const build = await run(["xcodebuild", "-version"], { timeout: 10_000 });
|
|
21
|
+
checks.push({
|
|
22
|
+
name: "xcodebuild",
|
|
23
|
+
ok: ok(build),
|
|
24
|
+
detail: brief(build),
|
|
25
|
+
fix: "Open Xcode once and accept license/components. CommandLineTools alone is not enough.",
|
|
26
|
+
});
|
|
27
|
+
const simctl = await run(["xcrun", "simctl", "help"], { timeout: 10_000 });
|
|
28
|
+
checks.push({
|
|
29
|
+
name: "simctl",
|
|
30
|
+
ok: ok(simctl),
|
|
31
|
+
detail: brief(simctl),
|
|
32
|
+
fix: "Install full Xcode and make sure xcrun can find simctl.",
|
|
33
|
+
});
|
|
34
|
+
const devices = await run(["xcrun", "simctl", "list", "devices", "--json"], { timeout: 20_000 });
|
|
35
|
+
const available = ok(devices) ? readAvailableDevices(devices.stdout) : [];
|
|
36
|
+
checks.push({
|
|
37
|
+
name: "simulator devices",
|
|
38
|
+
ok: ok(devices) && available.length > 0,
|
|
39
|
+
detail: ok(devices) ? `${available.length} available iOS/iPadOS simulator(s)` : brief(devices),
|
|
40
|
+
fix: "Install an iOS Simulator runtime from Xcode > Settings > Platforms.",
|
|
41
|
+
});
|
|
42
|
+
const ui = process.env.IOS_SIM_UI_BACKEND || "auto";
|
|
43
|
+
const idb = await run(["idb", "--version"], { timeout: 5000 });
|
|
44
|
+
checks.push({
|
|
45
|
+
name: "ui backend",
|
|
46
|
+
ok: ui === "none" || ok(idb) || ui === "auto",
|
|
47
|
+
detail: ok(idb) ? `idb ${idb.stdout.trim()}` : `backend=${ui}; idb unavailable`,
|
|
48
|
+
fix: "P0 build/run/screenshot works without UI backend. Install idb later for tap/swipe/type.",
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
ok: checks.every((item) => item.ok),
|
|
52
|
+
checks,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function readAvailableDevices(value) {
|
|
56
|
+
try {
|
|
57
|
+
return parseSimulators(value).filter((item) => item.available);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
type Found = {
|
|
2
|
+
projects: string[];
|
|
3
|
+
workspaces: string[];
|
|
4
|
+
schemes: string[];
|
|
5
|
+
bundleIds: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare function discover(dir?: string): Promise<Found>;
|
|
8
|
+
export declare function create(input: {
|
|
9
|
+
name: string;
|
|
10
|
+
bundleId?: string;
|
|
11
|
+
dir?: string;
|
|
12
|
+
deployment?: string;
|
|
13
|
+
overwrite?: boolean;
|
|
14
|
+
}): Promise<{
|
|
15
|
+
project: string;
|
|
16
|
+
scheme: string;
|
|
17
|
+
bundle: string;
|
|
18
|
+
files: string[];
|
|
19
|
+
}>;
|
|
20
|
+
export declare function bundle(flag: "-project" | "-workspace", file: string, scheme: string): Promise<string | undefined>;
|
|
21
|
+
export declare function source(input: {
|
|
22
|
+
project?: string;
|
|
23
|
+
workspace?: string;
|
|
24
|
+
scheme?: string;
|
|
25
|
+
}, found: Found): {
|
|
26
|
+
flag: "-workspace";
|
|
27
|
+
file: string;
|
|
28
|
+
scheme: string | undefined;
|
|
29
|
+
} | {
|
|
30
|
+
flag: "-project";
|
|
31
|
+
file: string;
|
|
32
|
+
scheme: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { access, mkdir, readdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { inside } from "../lib/path.js";
|
|
4
|
+
import { ok, run } from "../lib/run.js";
|
|
5
|
+
const IDS = [
|
|
6
|
+
"A10000000000000000000001",
|
|
7
|
+
"A10000000000000000000002",
|
|
8
|
+
"A10000000000000000000003",
|
|
9
|
+
"A10000000000000000000004",
|
|
10
|
+
"A10000000000000000000005",
|
|
11
|
+
"A10000000000000000000006",
|
|
12
|
+
"A10000000000000000000007",
|
|
13
|
+
"A10000000000000000000008",
|
|
14
|
+
"A10000000000000000000009",
|
|
15
|
+
"A1000000000000000000000A",
|
|
16
|
+
"A1000000000000000000000B",
|
|
17
|
+
"A1000000000000000000000C",
|
|
18
|
+
"A1000000000000000000000D",
|
|
19
|
+
"A1000000000000000000000E",
|
|
20
|
+
"A1000000000000000000000F",
|
|
21
|
+
"A10000000000000000000010",
|
|
22
|
+
"A10000000000000000000011",
|
|
23
|
+
"A10000000000000000000012",
|
|
24
|
+
"A10000000000000000000013",
|
|
25
|
+
"A10000000000000000000014",
|
|
26
|
+
"A10000000000000000000015",
|
|
27
|
+
"A10000000000000000000016",
|
|
28
|
+
];
|
|
29
|
+
export async function discover(dir = process.cwd()) {
|
|
30
|
+
const projects = [];
|
|
31
|
+
const workspaces = [];
|
|
32
|
+
await walk(dir, 3, (file) => {
|
|
33
|
+
if (file.endsWith(".xcodeproj"))
|
|
34
|
+
projects.push(path.relative(dir, file));
|
|
35
|
+
if (file.endsWith(".xcworkspace"))
|
|
36
|
+
workspaces.push(path.relative(dir, file));
|
|
37
|
+
});
|
|
38
|
+
const source = workspaces[0] ? { flag: "-workspace", file: workspaces[0] } : projects[0] ? { flag: "-project", file: projects[0] } : undefined;
|
|
39
|
+
const schemes = source ? await schemesFor(source.flag, source.file) : [];
|
|
40
|
+
const ids = new Set();
|
|
41
|
+
for (const item of projects) {
|
|
42
|
+
const file = path.join(dir, item, "project.pbxproj");
|
|
43
|
+
const text = await readFile(file, "utf8").catch(() => "");
|
|
44
|
+
for (const hit of text.matchAll(/PRODUCT_BUNDLE_IDENTIFIER = ([^;]+);/g))
|
|
45
|
+
ids.add(hit[1]?.replaceAll("\"", "").trim() ?? "");
|
|
46
|
+
}
|
|
47
|
+
return { projects, workspaces, schemes, bundleIds: [...ids].filter(Boolean) };
|
|
48
|
+
}
|
|
49
|
+
async function schemesFor(flag, file) {
|
|
50
|
+
const out = await run(["xcodebuild", "-list", "-json", flag, file], { timeout: 30_000 });
|
|
51
|
+
if (!ok(out))
|
|
52
|
+
return [];
|
|
53
|
+
const raw = JSON.parse(out.stdout);
|
|
54
|
+
return raw.project?.schemes ?? raw.workspace?.schemes ?? [];
|
|
55
|
+
}
|
|
56
|
+
async function walk(dir, depth, cb) {
|
|
57
|
+
if (depth < 0)
|
|
58
|
+
return;
|
|
59
|
+
const items = await readdir(dir, { withFileTypes: true }).catch(() => []);
|
|
60
|
+
await Promise.all(items
|
|
61
|
+
.filter((item) => !item.name.startsWith(".") && item.name !== "node_modules" && item.name !== "DerivedData")
|
|
62
|
+
.map(async (item) => {
|
|
63
|
+
const file = path.join(dir, item.name);
|
|
64
|
+
if (item.isDirectory() && (item.name.endsWith(".xcodeproj") || item.name.endsWith(".xcworkspace"))) {
|
|
65
|
+
cb(file);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (item.isDirectory())
|
|
69
|
+
await walk(file, depth - 1, cb);
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
export async function create(input) {
|
|
73
|
+
const cwd = process.cwd();
|
|
74
|
+
const name = clean(input.name);
|
|
75
|
+
const root = inside(cwd, input.dir || name);
|
|
76
|
+
const bundle = input.bundleId ? bundleId(input.bundleId) : `com.example.${slug(name)}`;
|
|
77
|
+
const target = deployment(input.deployment || "17.0");
|
|
78
|
+
const src = path.join(root, name);
|
|
79
|
+
const proj = path.join(root, `${name}.xcodeproj`);
|
|
80
|
+
const files = [
|
|
81
|
+
path.join(src, `${name}App.swift`),
|
|
82
|
+
path.join(src, "ContentView.swift"),
|
|
83
|
+
path.join(proj, "project.pbxproj"),
|
|
84
|
+
];
|
|
85
|
+
if (!input.overwrite) {
|
|
86
|
+
const hits = await present(files);
|
|
87
|
+
if (hits.length) {
|
|
88
|
+
throw new Error(`Refusing to overwrite existing iOS app files: ${hits.map((file) => path.relative(cwd, file)).join(", ")}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
await mkdir(src, { recursive: true });
|
|
92
|
+
await mkdir(proj, { recursive: true });
|
|
93
|
+
await writeFile(files[0], app(name), "utf8");
|
|
94
|
+
await writeFile(files[1], view(), "utf8");
|
|
95
|
+
await writeFile(files[2], pbx(name, bundle, target), "utf8");
|
|
96
|
+
return {
|
|
97
|
+
project: path.relative(cwd, proj),
|
|
98
|
+
scheme: name,
|
|
99
|
+
bundle,
|
|
100
|
+
files: files.slice(0, 2).map((file) => path.relative(cwd, file)),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export async function bundle(flag, file, scheme) {
|
|
104
|
+
const out = await run(["xcodebuild", flag, file, "-scheme", scheme, "-showBuildSettings"], { timeout: 60_000 });
|
|
105
|
+
if (!ok(out))
|
|
106
|
+
return undefined;
|
|
107
|
+
return out.stdout
|
|
108
|
+
.split("\n")
|
|
109
|
+
.map((line) => line.trim())
|
|
110
|
+
.find((line) => line.startsWith("PRODUCT_BUNDLE_IDENTIFIER = "))
|
|
111
|
+
?.replace("PRODUCT_BUNDLE_IDENTIFIER = ", "");
|
|
112
|
+
}
|
|
113
|
+
export function source(input, found) {
|
|
114
|
+
const workspace = input.workspace ? scoped(input.workspace, ".xcworkspace") : undefined;
|
|
115
|
+
const project = input.project ? scoped(input.project, ".xcodeproj") : undefined;
|
|
116
|
+
if (workspace)
|
|
117
|
+
return { flag: "-workspace", file: workspace, scheme: pick(input, found, workspace) };
|
|
118
|
+
if (project)
|
|
119
|
+
return { flag: "-project", file: project, scheme: pick(input, found, project) };
|
|
120
|
+
const auto = found.workspaces[0]
|
|
121
|
+
? { flag: "-workspace", file: found.workspaces[0] }
|
|
122
|
+
: found.projects[0]
|
|
123
|
+
? { flag: "-project", file: found.projects[0] }
|
|
124
|
+
: undefined;
|
|
125
|
+
if (auto)
|
|
126
|
+
return { ...auto, scheme: pick(input, found, auto.file) };
|
|
127
|
+
throw new Error("No .xcodeproj or .xcworkspace found. Use ios_create_app first.");
|
|
128
|
+
}
|
|
129
|
+
function pick(input, found, file) {
|
|
130
|
+
const first = found.workspaces[0] || found.projects[0];
|
|
131
|
+
return input.scheme || (file === first ? found.schemes[0] : undefined) || path.basename(file, path.extname(file));
|
|
132
|
+
}
|
|
133
|
+
async function present(files) {
|
|
134
|
+
return (await Promise.all(files.map(async (file) => {
|
|
135
|
+
const hit = await access(file)
|
|
136
|
+
.then(() => true)
|
|
137
|
+
.catch(() => false);
|
|
138
|
+
return hit ? file : undefined;
|
|
139
|
+
}))).filter((file) => file !== undefined);
|
|
140
|
+
}
|
|
141
|
+
function scoped(raw, ext) {
|
|
142
|
+
const file = inside(process.cwd(), raw);
|
|
143
|
+
if (!file.endsWith(ext))
|
|
144
|
+
throw new Error(`Expected ${ext} path: ${raw}`);
|
|
145
|
+
return path.relative(process.cwd(), file);
|
|
146
|
+
}
|
|
147
|
+
function bundleId(value) {
|
|
148
|
+
const parts = value.split(".");
|
|
149
|
+
const good = parts.length > 1 && parts.every((part) => /^[A-Za-z0-9][A-Za-z0-9-]*$/.test(part));
|
|
150
|
+
if (!good)
|
|
151
|
+
throw new Error(`Invalid bundle id: ${value}`);
|
|
152
|
+
return value;
|
|
153
|
+
}
|
|
154
|
+
function deployment(value) {
|
|
155
|
+
if (!/^[0-9]+(\.[0-9]+){0,2}$/.test(value))
|
|
156
|
+
throw new Error(`Invalid deployment target: ${value}`);
|
|
157
|
+
return value;
|
|
158
|
+
}
|
|
159
|
+
function slug(value) {
|
|
160
|
+
const out = value
|
|
161
|
+
.replace(/[^A-Za-z0-9-]/g, "-")
|
|
162
|
+
.replace(/-+/g, "-")
|
|
163
|
+
.replace(/^-|-$/g, "")
|
|
164
|
+
.toLowerCase();
|
|
165
|
+
if (/^[0-9]/.test(out))
|
|
166
|
+
return `app-${out}`;
|
|
167
|
+
return out || "app";
|
|
168
|
+
}
|
|
169
|
+
function clean(value) {
|
|
170
|
+
const out = value.replace(/[^A-Za-z0-9_]/g, "");
|
|
171
|
+
if (!out)
|
|
172
|
+
throw new Error("App name must contain letters or numbers.");
|
|
173
|
+
if (/^[0-9]/.test(out))
|
|
174
|
+
return `App${out}`;
|
|
175
|
+
return out;
|
|
176
|
+
}
|
|
177
|
+
function app(name) {
|
|
178
|
+
return `import SwiftUI
|
|
179
|
+
|
|
180
|
+
@main
|
|
181
|
+
struct ${name}App: App {
|
|
182
|
+
var body: some Scene {
|
|
183
|
+
WindowGroup {
|
|
184
|
+
ContentView()
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`;
|
|
189
|
+
}
|
|
190
|
+
function view() {
|
|
191
|
+
return `import SwiftUI
|
|
192
|
+
|
|
193
|
+
struct ContentView: View {
|
|
194
|
+
@State private var count = 0
|
|
195
|
+
|
|
196
|
+
var body: some View {
|
|
197
|
+
VStack(spacing: 20) {
|
|
198
|
+
Text("Hello from iOS")
|
|
199
|
+
.font(.largeTitle)
|
|
200
|
+
Text("Count: \\(count)")
|
|
201
|
+
.font(.title2)
|
|
202
|
+
.accessibilityIdentifier("countLabel")
|
|
203
|
+
Button("Increment") {
|
|
204
|
+
count += 1
|
|
205
|
+
}
|
|
206
|
+
.buttonStyle(.borderedProminent)
|
|
207
|
+
.accessibilityIdentifier("incrementButton")
|
|
208
|
+
}
|
|
209
|
+
.padding()
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
#Preview {
|
|
214
|
+
ContentView()
|
|
215
|
+
}
|
|
216
|
+
`;
|
|
217
|
+
}
|
|
218
|
+
function pbx(name, bundle, deployment) {
|
|
219
|
+
return `// !$*UTF8*$!
|
|
220
|
+
{
|
|
221
|
+
archiveVersion = 1;
|
|
222
|
+
classes = {};
|
|
223
|
+
objectVersion = 56;
|
|
224
|
+
objects = {
|
|
225
|
+
${IDS[0]} = {isa = PBXBuildFile; fileRef = ${IDS[1]}; };
|
|
226
|
+
${IDS[2]} = {isa = PBXBuildFile; fileRef = ${IDS[3]}; };
|
|
227
|
+
${IDS[1]} = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ${name}App.swift; sourceTree = "<group>"; };
|
|
228
|
+
${IDS[3]} = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
|
229
|
+
${IDS[4]} = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ${name}.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
230
|
+
${IDS[5]} = {
|
|
231
|
+
isa = PBXGroup;
|
|
232
|
+
children = (${IDS[6]}, ${IDS[7]});
|
|
233
|
+
sourceTree = "<group>";
|
|
234
|
+
};
|
|
235
|
+
${IDS[6]} = {
|
|
236
|
+
isa = PBXGroup;
|
|
237
|
+
children = (${IDS[1]}, ${IDS[3]});
|
|
238
|
+
path = ${name};
|
|
239
|
+
sourceTree = "<group>";
|
|
240
|
+
};
|
|
241
|
+
${IDS[7]} = {
|
|
242
|
+
isa = PBXGroup;
|
|
243
|
+
children = (${IDS[4]});
|
|
244
|
+
name = Products;
|
|
245
|
+
sourceTree = "<group>";
|
|
246
|
+
};
|
|
247
|
+
${IDS[8]} = {
|
|
248
|
+
isa = PBXNativeTarget;
|
|
249
|
+
buildConfigurationList = ${IDS[9]};
|
|
250
|
+
buildPhases = (${IDS[10]});
|
|
251
|
+
buildRules = ();
|
|
252
|
+
dependencies = ();
|
|
253
|
+
name = ${name};
|
|
254
|
+
productName = ${name};
|
|
255
|
+
productReference = ${IDS[4]};
|
|
256
|
+
productType = "com.apple.product-type.application";
|
|
257
|
+
};
|
|
258
|
+
${IDS[10]} = {
|
|
259
|
+
isa = PBXSourcesBuildPhase;
|
|
260
|
+
buildActionMask = 2147483647;
|
|
261
|
+
files = (${IDS[0]}, ${IDS[2]});
|
|
262
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
263
|
+
};
|
|
264
|
+
${IDS[11]} = {
|
|
265
|
+
isa = PBXProject;
|
|
266
|
+
attributes = {BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1500; LastUpgradeCheck = 1500; TargetAttributes = {${IDS[8]} = {CreatedOnToolsVersion = 15.0;};};};
|
|
267
|
+
buildConfigurationList = ${IDS[12]};
|
|
268
|
+
compatibilityVersion = "Xcode 14.0";
|
|
269
|
+
developmentRegion = en;
|
|
270
|
+
hasScannedForEncodings = 0;
|
|
271
|
+
knownRegions = (en, Base);
|
|
272
|
+
mainGroup = ${IDS[5]};
|
|
273
|
+
productRefGroup = ${IDS[7]};
|
|
274
|
+
projectDirPath = "";
|
|
275
|
+
projectRoot = "";
|
|
276
|
+
targets = (${IDS[8]});
|
|
277
|
+
};
|
|
278
|
+
${IDS[13]} = {isa = XCBuildConfiguration; buildSettings = {ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu17; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ("DEBUG=1", "$(inherited)"); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = ${deployment}; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone";}; name = Debug; };
|
|
279
|
+
${IDS[14]} = {isa = XCBuildConfiguration; buildSettings = {ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu17; IPHONEOS_DEPLOYMENT_TARGET = ${deployment}; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES;}; name = Release; };
|
|
280
|
+
${IDS[15]} = {isa = XCBuildConfiguration; buildSettings = {ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = ${bundle}; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2";}; name = Debug; };
|
|
281
|
+
${IDS[16]} = {isa = XCBuildConfiguration; buildSettings = {ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = ""; DEVELOPMENT_TEAM = ""; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = ${bundle}; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2";}; name = Release; };
|
|
282
|
+
${IDS[12]} = {isa = XCConfigurationList; buildConfigurations = (${IDS[13]}, ${IDS[14]}); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
|
|
283
|
+
${IDS[9]} = {isa = XCConfigurationList; buildConfigurations = (${IDS[15]}, ${IDS[16]}); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; };
|
|
284
|
+
};
|
|
285
|
+
rootObject = ${IDS[11]};
|
|
286
|
+
}
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type Shot = {
|
|
2
|
+
udid?: string;
|
|
3
|
+
device?: string;
|
|
4
|
+
runtime?: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
openSimulator?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function shot(input?: Shot): Promise<{
|
|
9
|
+
simulator: {
|
|
10
|
+
opened: boolean;
|
|
11
|
+
name: string;
|
|
12
|
+
udid: string;
|
|
13
|
+
state: string;
|
|
14
|
+
runtime: string;
|
|
15
|
+
available: boolean;
|
|
16
|
+
};
|
|
17
|
+
path: string;
|
|
18
|
+
bytes: number;
|
|
19
|
+
data: string;
|
|
20
|
+
}>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=screenshot.d.ts.map
|