@lynxship/cli 0.1.20 → 0.1.21
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 +66 -5
- package/dist/android/signing.d.ts +16 -0
- package/dist/android/signing.d.ts.map +1 -0
- package/dist/android/signing.js +131 -0
- package/dist/android/types.d.ts +12 -0
- package/dist/android/types.d.ts.map +1 -0
- package/dist/android/types.js +1 -0
- package/dist/android-build.d.ts +4 -13
- package/dist/android-build.d.ts.map +1 -1
- package/dist/android-build.js +14 -133
- package/dist/android-toolchain/inspection.d.ts +3 -0
- package/dist/android-toolchain/inspection.d.ts.map +1 -0
- package/dist/android-toolchain/inspection.js +122 -0
- package/dist/android-toolchain/probes.d.ts +23 -0
- package/dist/android-toolchain/probes.d.ts.map +1 -0
- package/dist/android-toolchain/probes.js +183 -0
- package/dist/android-toolchain/types.d.ts +20 -0
- package/dist/android-toolchain/types.d.ts.map +1 -0
- package/dist/android-toolchain/types.js +1 -0
- package/dist/android-toolchain.d.ts +4 -20
- package/dist/android-toolchain.d.ts.map +1 -1
- package/dist/android-toolchain.js +4 -300
- package/dist/app-config.d.ts +25 -0
- package/dist/app-config.d.ts.map +1 -0
- package/dist/app-config.js +106 -0
- package/dist/bundle-build.d.ts.map +1 -1
- package/dist/bundle-build.js +11 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +66 -0
- package/dist/commands/build-execution.d.ts +41 -0
- package/dist/commands/build-execution.d.ts.map +1 -0
- package/dist/commands/build-execution.js +182 -0
- package/dist/commands/configuration.d.ts +19 -0
- package/dist/commands/configuration.d.ts.map +1 -0
- package/dist/commands/configuration.js +174 -0
- package/dist/commands/development.d.ts +22 -0
- package/dist/commands/development.d.ts.map +1 -0
- package/dist/commands/development.js +132 -0
- package/dist/commands/device.d.ts +3 -0
- package/dist/commands/device.d.ts.map +1 -0
- package/dist/commands/device.js +86 -0
- package/dist/commands/doctor.d.ts +18 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +320 -0
- package/dist/commands/help.d.ts +2 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +118 -0
- package/dist/commands/i18n.d.ts +14 -0
- package/dist/commands/i18n.d.ts.map +1 -0
- package/dist/commands/i18n.js +88 -0
- package/dist/commands/logs.d.ts +3 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +51 -0
- package/dist/commands/metadata.d.ts +3 -0
- package/dist/commands/metadata.d.ts.map +1 -0
- package/dist/commands/metadata.js +45 -0
- package/dist/commands/ota.d.ts +28 -0
- package/dist/commands/ota.d.ts.map +1 -0
- package/dist/commands/ota.js +203 -0
- package/dist/commands/project.d.ts +14 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +122 -0
- package/dist/commands/remote-build.d.ts +35 -0
- package/dist/commands/remote-build.d.ts.map +1 -0
- package/dist/commands/remote-build.js +73 -0
- package/dist/commands/submit.d.ts +27 -0
- package/dist/commands/submit.d.ts.map +1 -0
- package/dist/commands/submit.js +92 -0
- package/dist/ecosystem.d.ts +9 -0
- package/dist/ecosystem.d.ts.map +1 -0
- package/dist/ecosystem.js +95 -0
- package/dist/frameworks.d.ts.map +1 -1
- package/dist/frameworks.js +5 -1
- package/dist/guidance/catalog.d.ts +3 -0
- package/dist/guidance/catalog.d.ts.map +1 -0
- package/dist/guidance/catalog.js +504 -0
- package/dist/guidance/types.d.ts +10 -0
- package/dist/guidance/types.d.ts.map +1 -0
- package/dist/guidance/types.js +1 -0
- package/dist/guidance.d.ts +2 -9
- package/dist/guidance.d.ts.map +1 -1
- package/dist/guidance.js +1 -502
- package/dist/i18n/discovery.d.ts +14 -0
- package/dist/i18n/discovery.d.ts.map +1 -0
- package/dist/i18n/discovery.js +106 -0
- package/dist/i18n/plan.d.ts +12 -0
- package/dist/i18n/plan.d.ts.map +1 -0
- package/dist/i18n/plan.js +95 -0
- package/dist/i18n/setup.d.ts +11 -0
- package/dist/i18n/setup.d.ts.map +1 -0
- package/dist/i18n/setup.js +47 -0
- package/dist/i18n/types.d.ts +17 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2069
- package/dist/ios/assets.d.ts +19 -0
- package/dist/ios/assets.d.ts.map +1 -0
- package/dist/ios/assets.js +128 -0
- package/dist/ios/production-build.d.ts +6 -0
- package/dist/ios/production-build.d.ts.map +1 -0
- package/dist/ios/production-build.js +200 -0
- package/dist/ios/project.d.ts +4 -0
- package/dist/ios/project.d.ts.map +1 -0
- package/dist/ios/project.js +43 -0
- package/dist/ios/simulator-build.d.ts +8 -0
- package/dist/ios/simulator-build.d.ts.map +1 -0
- package/dist/ios/simulator-build.js +188 -0
- package/dist/ios/simulator.d.ts +5 -0
- package/dist/ios/simulator.d.ts.map +1 -0
- package/dist/ios/simulator.js +60 -0
- package/dist/ios/types.d.ts +14 -0
- package/dist/ios/types.d.ts.map +1 -0
- package/dist/ios/types.js +1 -0
- package/dist/ios-build.d.ts +4 -37
- package/dist/ios-build.d.ts.map +1 -1
- package/dist/ios-build.js +3 -575
- package/dist/ios-host.d.ts.map +1 -1
- package/dist/ios-toolchain/inspection.d.ts +4 -0
- package/dist/ios-toolchain/inspection.d.ts.map +1 -0
- package/dist/ios-toolchain/inspection.js +211 -0
- package/dist/ios-toolchain/probes.d.ts +24 -0
- package/dist/ios-toolchain/probes.d.ts.map +1 -0
- package/dist/ios-toolchain/probes.js +127 -0
- package/dist/ios-toolchain/types.d.ts +17 -0
- package/dist/ios-toolchain/types.d.ts.map +1 -0
- package/dist/ios-toolchain/types.js +1 -0
- package/dist/ios-toolchain.d.ts +3 -18
- package/dist/ios-toolchain.d.ts.map +1 -1
- package/dist/ios-toolchain.js +1 -333
- package/dist/plugins/contracts.d.ts +28 -0
- package/dist/plugins/contracts.d.ts.map +1 -0
- package/dist/plugins/contracts.js +1 -0
- package/dist/plugins/discovery.d.ts +19 -0
- package/dist/plugins/discovery.d.ts.map +1 -0
- package/dist/plugins/discovery.js +250 -0
- package/dist/plugins/native-operations.d.ts +28 -0
- package/dist/plugins/native-operations.d.ts.map +1 -0
- package/dist/plugins/native-operations.js +217 -0
- package/dist/plugins/operations.d.ts +9 -0
- package/dist/plugins/operations.d.ts.map +1 -0
- package/dist/plugins/operations.js +76 -0
- package/dist/plugins/validation.d.ts +9 -0
- package/dist/plugins/validation.d.ts.map +1 -0
- package/dist/plugins/validation.js +52 -0
- package/dist/plugins.d.ts +3 -34
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +2 -595
- package/dist/process-runner.d.ts +4 -0
- package/dist/process-runner.d.ts.map +1 -1
- package/dist/process-runner.js +14 -0
- package/dist/remote.d.ts +22 -1
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +141 -2
- package/dist/rspeedy-app-config.d.ts +4 -0
- package/dist/rspeedy-app-config.d.ts.map +1 -0
- package/dist/rspeedy-app-config.js +32 -0
- package/dist/runtime/args.d.ts +3 -0
- package/dist/runtime/args.d.ts.map +1 -0
- package/dist/runtime/args.js +11 -0
- package/dist/runtime/build-commands.d.ts +3 -0
- package/dist/runtime/build-commands.d.ts.map +1 -0
- package/dist/runtime/build-commands.js +282 -0
- package/dist/runtime/context.d.ts +63 -0
- package/dist/runtime/context.d.ts.map +1 -0
- package/dist/runtime/context.js +179 -0
- package/dist/runtime/early-commands.d.ts +4 -0
- package/dist/runtime/early-commands.d.ts.map +1 -0
- package/dist/runtime/early-commands.js +284 -0
- package/dist/runtime/project.d.ts +8 -0
- package/dist/runtime/project.d.ts.map +1 -0
- package/dist/runtime/project.js +38 -0
- package/dist/runtime/state.d.ts +47 -0
- package/dist/runtime/state.d.ts.map +1 -0
- package/dist/runtime/state.js +33 -0
- package/dist/secure-store/backends.d.ts +20 -0
- package/dist/secure-store/backends.d.ts.map +1 -0
- package/dist/secure-store/backends.js +248 -0
- package/dist/secure-store/types.d.ts +27 -0
- package/dist/secure-store/types.d.ts.map +1 -0
- package/dist/secure-store/types.js +1 -0
- package/dist/secure-store.d.ts +2 -26
- package/dist/secure-store.d.ts.map +1 -1
- package/dist/secure-store.js +3 -245
- package/package.json +7 -4
- package/templates/android-host/app/build.gradle +1 -0
- package/templates/android-host/app/src/main/java/template/MainActivity.java +98 -3
- package/templates/ios-host/__IOS_TARGET_NAME__/DemoLynxProvider.swift +26 -16
- package/templates/ios-host/__IOS_TARGET_NAME__/ViewController.swift +107 -19
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { assert } from "@lynxship/contracts";
|
|
5
|
+
import { captureProcess, runProcess } from "../process-runner.js";
|
|
6
|
+
async function listSimulatorDevices(root, filter) {
|
|
7
|
+
const result = await captureProcess("xcrun", ["simctl", "list", "devices", filter, "--json"], { cwd: root });
|
|
8
|
+
if (result.code !== 0)
|
|
9
|
+
return [];
|
|
10
|
+
try {
|
|
11
|
+
const parsed = JSON.parse(result.stdout);
|
|
12
|
+
return Object.values(parsed.devices ?? {}).flat();
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export async function selectSimulatorDevice(root, requested) {
|
|
19
|
+
if (requested)
|
|
20
|
+
return requested;
|
|
21
|
+
const booted = (await listSimulatorDevices(root, "booted"))[0];
|
|
22
|
+
if (booted)
|
|
23
|
+
return booted.udid;
|
|
24
|
+
const available = (await listSimulatorDevices(root, "available")).find((device) => device.isAvailable !== false);
|
|
25
|
+
assert(available, "IOS_SIMULATOR_RUNTIME_REQUIRED", "No available iOS Simulator device was found. Install an iOS Simulator runtime in Xcode, then rerun the build.");
|
|
26
|
+
return available.udid;
|
|
27
|
+
}
|
|
28
|
+
export async function ensureSimulatorBooted(root, device, onEvent, quiet) {
|
|
29
|
+
const booted = (await listSimulatorDevices(root, "booted")).some((entry) => entry.udid === device);
|
|
30
|
+
if (!booted) {
|
|
31
|
+
onEvent?.(`Booting iOS Simulator ${device}…`);
|
|
32
|
+
await runProcess("xcrun", ["simctl", "boot", device], {
|
|
33
|
+
cwd: root,
|
|
34
|
+
quiet,
|
|
35
|
+
onOutput: onEvent,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
await runProcess("xcrun", ["simctl", "bootstatus", device, "-b"], {
|
|
39
|
+
cwd: root,
|
|
40
|
+
quiet,
|
|
41
|
+
onOutput: onEvent,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export async function findSimulatorApp(derivedData, configuration, scheme) {
|
|
45
|
+
const products = join(derivedData, "Build", "Products", `${configuration}-iphonesimulator`);
|
|
46
|
+
const expected = join(products, `${scheme}.app`);
|
|
47
|
+
if (existsSync(expected))
|
|
48
|
+
return expected;
|
|
49
|
+
const entries = await readdir(products, { withFileTypes: true }).catch(() => []);
|
|
50
|
+
const app = entries.find((entry) => entry.isDirectory() && entry.name.endsWith(".app"));
|
|
51
|
+
assert(app, "IOS_SIMULATOR_ARTIFACT_MISSING", `Xcode did not produce a Simulator .app under ${products}`);
|
|
52
|
+
return join(products, app.name);
|
|
53
|
+
}
|
|
54
|
+
export async function findArchiveApp(archivePath) {
|
|
55
|
+
const products = join(archivePath, "Products", "Applications");
|
|
56
|
+
const entries = await readdir(products, { withFileTypes: true }).catch(() => []);
|
|
57
|
+
const app = entries.find((entry) => entry.isDirectory() && entry.name.endsWith(".app"));
|
|
58
|
+
assert(app, "IOS_ARCHIVE_ARTIFACT_MISSING", `Xcode did not produce an app bundle under ${products}`);
|
|
59
|
+
return join(products, app.name);
|
|
60
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuildProfile } from "../config.js";
|
|
2
|
+
export interface IosBuildOptions {
|
|
3
|
+
root: string;
|
|
4
|
+
profile: BuildProfile;
|
|
5
|
+
uploadArtifacts?: boolean;
|
|
6
|
+
simulator?: boolean;
|
|
7
|
+
simulatorDevice?: string;
|
|
8
|
+
simulatorAutostart?: boolean;
|
|
9
|
+
skipBundleBuild?: boolean;
|
|
10
|
+
quiet?: boolean;
|
|
11
|
+
onEvent?: (message: string) => void;
|
|
12
|
+
onProgress?: (value?: number, label?: string) => void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ios/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ios-build.d.ts
CHANGED
|
@@ -1,38 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
profile: BuildProfile;
|
|
6
|
-
uploadArtifacts?: boolean;
|
|
7
|
-
simulator?: boolean;
|
|
8
|
-
simulatorDevice?: string;
|
|
9
|
-
simulatorAutostart?: boolean;
|
|
10
|
-
skipBundleBuild?: boolean;
|
|
11
|
-
quiet?: boolean;
|
|
12
|
-
onEvent?: (message: string) => void;
|
|
13
|
-
onProgress?: (value?: number, label?: string) => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Rspeedy leaves external resources beside the Lynx bundle. Xcode does not
|
|
17
|
-
* know about those generated files, so copy the complete output into the
|
|
18
|
-
* final app bundle after the native host has been compiled. This also makes
|
|
19
|
-
* older LynxShip-generated iOS hosts behave correctly without editing their
|
|
20
|
-
* Xcode project files.
|
|
21
|
-
*/
|
|
22
|
-
export declare function syncIosRuntimeResources(root: string, appBundle: string): Promise<string[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Apply a project-owned 1024x1024 PNG to the generated or existing Xcode
|
|
25
|
-
* AppIcon set. A missing icon is reported as a warning by the caller rather
|
|
26
|
-
* than silently inventing product branding.
|
|
27
|
-
*/
|
|
28
|
-
export declare function prepareIosAppIcon(root: string, configured?: string, options?: {
|
|
29
|
-
allowFallback?: boolean;
|
|
30
|
-
}): Promise<string | undefined>;
|
|
31
|
-
export declare function launchIosSimulatorApp(root: string, device: string, appBundle: string, options?: {
|
|
32
|
-
quiet?: boolean;
|
|
33
|
-
onEvent?: (message: string) => void;
|
|
34
|
-
}): Promise<void>;
|
|
35
|
-
export declare function hasIosHost(root: string, profile?: BuildProfile): boolean;
|
|
36
|
-
export declare function runRealIosBuild(job: BuildJob, options: IosBuildOptions): Promise<BuildJob>;
|
|
37
|
-
export {};
|
|
1
|
+
export type { IosBuildOptions } from "./ios/types.js";
|
|
2
|
+
export { prepareIosAppIcon, syncIosRuntimeResources } from "./ios/assets.js";
|
|
3
|
+
export { launchIosSimulatorApp, runRealIosSimulatorBuild, } from "./ios/simulator-build.js";
|
|
4
|
+
export { hasIosHost, runRealIosBuild } from "./ios/production-build.js";
|
|
38
5
|
//# sourceMappingURL=ios-build.d.ts.map
|
package/dist/ios-build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ios-build.d.ts","sourceRoot":"","sources":["../src/ios-build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ios-build.d.ts","sourceRoot":"","sources":["../src/ios-build.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC"}
|