@lynxship/cli 0.1.19 → 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/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/components.js +2 -1
- 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
package/dist/remote.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"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"}
|
package/dist/remote.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import { decodeSourceSnapshot, SOURCE_SNAPSHOT_CONTENT_TYPE, } from "@lynxship/build-orchestrator";
|
|
2
|
+
import { sha256 } from "@lynxship/contracts";
|
|
3
|
+
export class RemoteApiError extends Error {
|
|
4
|
+
status;
|
|
5
|
+
code;
|
|
6
|
+
constructor(status, message, code) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.name = "RemoteApiError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
1
13
|
function apiUrl(options) {
|
|
2
14
|
return (options.apiUrl ??
|
|
3
15
|
process.env.LYNXSHIP_API_URL ??
|
|
@@ -12,9 +24,18 @@ async function request(options, path, init = {}) {
|
|
|
12
24
|
...init,
|
|
13
25
|
headers,
|
|
14
26
|
});
|
|
15
|
-
const
|
|
27
|
+
const text = await response.text();
|
|
28
|
+
let body;
|
|
29
|
+
try {
|
|
30
|
+
body = JSON.parse(text);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
body = undefined;
|
|
34
|
+
}
|
|
16
35
|
if (!response.ok)
|
|
17
|
-
throw new
|
|
36
|
+
throw new RemoteApiError(response.status, `LynxShip API ${response.status}: ${body?.message ?? body?.error ?? response.statusText}`, body?.error);
|
|
37
|
+
if (!body)
|
|
38
|
+
throw new Error("LynxShip API returned invalid JSON");
|
|
18
39
|
return body;
|
|
19
40
|
}
|
|
20
41
|
export async function ensureRemoteTarget(config, state) {
|
|
@@ -57,6 +78,124 @@ export async function ensureRemoteTarget(config, state) {
|
|
|
57
78
|
}
|
|
58
79
|
return { organizationId, projectId };
|
|
59
80
|
}
|
|
81
|
+
export async function uploadBuildSource(config, state, bytes) {
|
|
82
|
+
const target = await ensureRemoteTarget(config, state);
|
|
83
|
+
let directSource;
|
|
84
|
+
try {
|
|
85
|
+
const snapshot = decodeSourceSnapshot(bytes);
|
|
86
|
+
directSource = {
|
|
87
|
+
key: `sources/${sha256(bytes)}`,
|
|
88
|
+
hash: sha256(bytes),
|
|
89
|
+
size: bytes.length,
|
|
90
|
+
contentType: SOURCE_SNAPSHOT_CONTENT_TYPE,
|
|
91
|
+
fileCount: snapshot.files.length,
|
|
92
|
+
};
|
|
93
|
+
const plan = await request({
|
|
94
|
+
apiUrl: config.cli?.apiUrl,
|
|
95
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
96
|
+
}, "/v1/build-sources/upload-plan", {
|
|
97
|
+
method: "POST",
|
|
98
|
+
body: JSON.stringify({ ...target, source: directSource }),
|
|
99
|
+
});
|
|
100
|
+
const uploaded = await fetch(plan.upload.url, {
|
|
101
|
+
method: plan.upload.method,
|
|
102
|
+
headers: plan.upload.headers,
|
|
103
|
+
body: Uint8Array.from(bytes),
|
|
104
|
+
});
|
|
105
|
+
if (!uploaded.ok)
|
|
106
|
+
throw new Error(`Direct source upload failed with HTTP ${uploaded.status}`);
|
|
107
|
+
const completed = await request({
|
|
108
|
+
apiUrl: config.cli?.apiUrl,
|
|
109
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
110
|
+
}, "/v1/build-sources/complete", {
|
|
111
|
+
method: "POST",
|
|
112
|
+
body: JSON.stringify({ ...target, source: plan.source }),
|
|
113
|
+
});
|
|
114
|
+
return completed.source;
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
const code = typeof error === "object" && error !== null && "code" in error
|
|
118
|
+
? error.code
|
|
119
|
+
: undefined;
|
|
120
|
+
if (!((error instanceof RemoteApiError &&
|
|
121
|
+
(error.status === 404 ||
|
|
122
|
+
error.code === "SOURCE_DIRECT_UPLOAD_UNAVAILABLE")) ||
|
|
123
|
+
code === "SOURCE_SNAPSHOT_INVALID"))
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
126
|
+
const response = await request({
|
|
127
|
+
apiUrl: config.cli?.apiUrl,
|
|
128
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
129
|
+
}, "/v1/build-sources", {
|
|
130
|
+
method: "POST",
|
|
131
|
+
body: JSON.stringify({
|
|
132
|
+
...target,
|
|
133
|
+
dataBase64: bytes.toString("base64"),
|
|
134
|
+
}),
|
|
135
|
+
});
|
|
136
|
+
return response.source;
|
|
137
|
+
}
|
|
138
|
+
export async function createRemoteBuild(config, state, input) {
|
|
139
|
+
const target = await ensureRemoteTarget(config, state);
|
|
140
|
+
return request({
|
|
141
|
+
apiUrl: config.cli?.apiUrl,
|
|
142
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
143
|
+
}, "/v1/builds", {
|
|
144
|
+
method: "POST",
|
|
145
|
+
body: JSON.stringify({
|
|
146
|
+
...target,
|
|
147
|
+
platform: input.platform,
|
|
148
|
+
profile: input.profile,
|
|
149
|
+
source: input.source,
|
|
150
|
+
sourceHash: input.source.hash,
|
|
151
|
+
idempotencyKey: input.idempotencyKey ??
|
|
152
|
+
"cli:" +
|
|
153
|
+
input.platform +
|
|
154
|
+
":" +
|
|
155
|
+
input.profile +
|
|
156
|
+
":" +
|
|
157
|
+
input.source.hash,
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
export async function getRemoteBuild(config, id) {
|
|
162
|
+
return request({
|
|
163
|
+
apiUrl: config.cli?.apiUrl,
|
|
164
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
165
|
+
}, "/v1/builds/" + encodeURIComponent(id));
|
|
166
|
+
}
|
|
167
|
+
export async function listRemoteBuilds(config, state) {
|
|
168
|
+
const { organizationId, projectId } = await ensureRemoteTarget(config, state);
|
|
169
|
+
return request({
|
|
170
|
+
apiUrl: config.cli?.apiUrl,
|
|
171
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
172
|
+
}, `/v1/builds?organizationId=${encodeURIComponent(organizationId)}&projectId=${encodeURIComponent(projectId)}`);
|
|
173
|
+
}
|
|
174
|
+
export async function cancelRemoteBuild(config, id) {
|
|
175
|
+
return request({
|
|
176
|
+
apiUrl: config.cli?.apiUrl,
|
|
177
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
178
|
+
}, `/v1/builds/${encodeURIComponent(id)}/cancel`, { method: "POST", body: JSON.stringify({}) });
|
|
179
|
+
}
|
|
180
|
+
export async function retryRemoteBuild(config, id) {
|
|
181
|
+
return request({
|
|
182
|
+
apiUrl: config.cli?.apiUrl,
|
|
183
|
+
token: config.cli?.token ?? process.env.LYNXSHIP_TOKEN,
|
|
184
|
+
}, `/v1/builds/${encodeURIComponent(id)}/retry`, { method: "POST", body: JSON.stringify({}) });
|
|
185
|
+
}
|
|
186
|
+
export async function waitForRemoteBuild(config, id, options = {}) {
|
|
187
|
+
const timeoutMs = options.timeoutMs ?? 60 * 60 * 1_000;
|
|
188
|
+
const pollMs = options.pollMs ?? 2_000;
|
|
189
|
+
const startedAt = Date.now();
|
|
190
|
+
for (;;) {
|
|
191
|
+
const job = await getRemoteBuild(config, id);
|
|
192
|
+
if (["success", "failed", "canceled", "timed_out"].includes(job.state))
|
|
193
|
+
return job;
|
|
194
|
+
if (Date.now() - startedAt >= timeoutMs)
|
|
195
|
+
throw new Error("Remote build " + id + " did not finish before the timeout");
|
|
196
|
+
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
60
199
|
export async function submitRealArtifact(config, state, job, latest) {
|
|
61
200
|
if (!job.artifact?.key || !job.artifact.url)
|
|
62
201
|
throw new Error("The build artifact is not registered in Cloudflare R2");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LoadedLynxShipAppConfig } from "./app-config.js";
|
|
2
|
+
/** Build the `lynxConfig` exported by app.config without generating a proxy file. */
|
|
3
|
+
export declare function buildRspeedyAppConfig(root: string, appConfig: LoadedLynxShipAppConfig): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=rspeedy-app-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rspeedy-app-config.d.ts","sourceRoot":"","sources":["../src/rspeedy-app-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAuC/D,qFAAqF;AACrF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,uBAAuB,GACjC,OAAO,CAAC,IAAI,CAAC,CAQf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { createJiti } from "jiti";
|
|
3
|
+
import { LynxShipError } from "@lynxship/contracts";
|
|
4
|
+
function buildError(code, message) {
|
|
5
|
+
return new LynxShipError(code, message);
|
|
6
|
+
}
|
|
7
|
+
async function loadProjectRspeedy(root) {
|
|
8
|
+
try {
|
|
9
|
+
const jiti = createJiti(join(root, "package.json"), {
|
|
10
|
+
fsCache: false,
|
|
11
|
+
moduleCache: false,
|
|
12
|
+
sourceMaps: false,
|
|
13
|
+
});
|
|
14
|
+
const module = (await jiti.import("@lynx-js/rspeedy"));
|
|
15
|
+
if (typeof module.createRspeedy !== "function")
|
|
16
|
+
throw new Error("@lynx-js/rspeedy does not expose createRspeedy");
|
|
17
|
+
return module;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
throw buildError("CLI_RSPEEDY_REQUIRED", `A Lynx app.config was found, but @lynx-js/rspeedy could not be loaded from the project: ${error instanceof Error ? error.message : String(error)}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Build the `lynxConfig` exported by app.config without generating a proxy file. */
|
|
24
|
+
export async function buildRspeedyAppConfig(root, appConfig) {
|
|
25
|
+
const { createRspeedy } = await loadProjectRspeedy(root);
|
|
26
|
+
const instance = await createRspeedy({
|
|
27
|
+
cwd: root,
|
|
28
|
+
rspeedyConfig: appConfig.config.lynxConfig,
|
|
29
|
+
callerName: "lynxship",
|
|
30
|
+
});
|
|
31
|
+
await instance.build();
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/runtime/args.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAM,GAAG,IAAW,GAC7B,MAAM,GAAG,IAAI,CAGf"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function projectDirectoryFlag(values) {
|
|
2
|
+
const index = values.indexOf("--project-dir");
|
|
3
|
+
if (index >= 0)
|
|
4
|
+
return values[index + 1];
|
|
5
|
+
const inline = values.find((value) => value.startsWith("--project-dir="));
|
|
6
|
+
return inline?.slice("--project-dir=".length);
|
|
7
|
+
}
|
|
8
|
+
export function readFlag(values, name, fallback = null) {
|
|
9
|
+
const index = values.indexOf(name);
|
|
10
|
+
return index >= 0 ? (values[index + 1] ?? "true") : fallback;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-commands.d.ts","sourceRoot":"","sources":["../../src/runtime/build-commands.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAgRf"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { assert } from "@lynxship/contracts";
|
|
2
|
+
import { loadConfig, platformValue, resolveProfile, } from "../config.js";
|
|
3
|
+
import { ensureNativeHostForBuild, initializeBuildProject, } from "../commands/project.js";
|
|
4
|
+
import { executeBuild } from "../commands/build-execution.js";
|
|
5
|
+
import { runOtaCommand } from "../commands/ota.js";
|
|
6
|
+
import { runSubmit } from "../commands/submit.js";
|
|
7
|
+
import { executeRemoteBuild } from "../commands/remote-build.js";
|
|
8
|
+
import { cancelRemoteBuild, ensureRemoteTarget, getRemoteBuild, listRemoteBuilds, retryRemoteBuild, } from "../remote.js";
|
|
9
|
+
import { prepareRemoteSource } from "../commands/remote-build.js";
|
|
10
|
+
import { loadState, saveState } from "./state.js";
|
|
11
|
+
export async function runBuildOrStateCommand(context, command) {
|
|
12
|
+
if (command === "build")
|
|
13
|
+
await initializeBuildProject(context.projectCommandContext);
|
|
14
|
+
const { state, repository, builds, submissions } = await loadState(context.root);
|
|
15
|
+
if (command === "rollback" || command === "update") {
|
|
16
|
+
await runOtaCommand({
|
|
17
|
+
root: context.root,
|
|
18
|
+
args: context.args,
|
|
19
|
+
ui: context.ui,
|
|
20
|
+
flag: context.flag,
|
|
21
|
+
printValue: context.printValue,
|
|
22
|
+
requireOperationalConfiguration: (target) => context.requireOperationalConfiguration(target),
|
|
23
|
+
requireR2Configuration: context.requireR2Configuration,
|
|
24
|
+
configuredProjectId: context.configuredProjectId,
|
|
25
|
+
mobilePlatformValue: context.mobilePlatformValue,
|
|
26
|
+
state,
|
|
27
|
+
repository,
|
|
28
|
+
builds,
|
|
29
|
+
submissions,
|
|
30
|
+
}, command);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (command === "submit") {
|
|
34
|
+
await runSubmit({
|
|
35
|
+
root: context.root,
|
|
36
|
+
args: context.args,
|
|
37
|
+
ui: context.ui,
|
|
38
|
+
flag: context.flag,
|
|
39
|
+
printValue: context.printValue,
|
|
40
|
+
requireOperationalConfiguration: context.requireOperationalConfiguration,
|
|
41
|
+
configuredProjectId: context.configuredProjectId,
|
|
42
|
+
mobilePlatformValue: context.mobilePlatformValue,
|
|
43
|
+
state,
|
|
44
|
+
repository,
|
|
45
|
+
builds,
|
|
46
|
+
submissions,
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const subcommand = context.args[0] && !context.args[0].startsWith("--")
|
|
51
|
+
? (context.args.shift() ?? "create")
|
|
52
|
+
: "create";
|
|
53
|
+
const platformArgument = context.flag("--platform", "android");
|
|
54
|
+
const buildAll = subcommand === "all" || platformArgument === "all";
|
|
55
|
+
const platform = buildAll ? "android" : platformValue(platformArgument);
|
|
56
|
+
const simulator = context.args.includes("--simulator");
|
|
57
|
+
const remote = context.args.includes("--remote");
|
|
58
|
+
const skipUpload = context.args.includes("--no-upload") || simulator;
|
|
59
|
+
assert(!remote || !context.args.includes("--local"), "CLI_BUILD_FLAGS", "--remote and --local are mutually exclusive.");
|
|
60
|
+
assert(!remote || !simulator, "CLI_BUILD_FLAGS", "--remote cannot create a local iOS Simulator app. Use a local macOS build for simulator output.");
|
|
61
|
+
assert(!remote || !context.args.includes("--no-upload"), "CLI_BUILD_FLAGS", "--remote always stores the build artifact on the configured remote worker; remove --no-upload.");
|
|
62
|
+
assert(!simulator || platformArgument === "ios", "IOS_SIMULATOR_PLATFORM", "The --simulator option is only available with --platform ios.");
|
|
63
|
+
const allowUnsigned = context.args.includes("--allow-unsigned");
|
|
64
|
+
assert(!allowUnsigned || skipUpload, "CLI_UNSIGNED_UPLOAD_BLOCKED", "--allow-unsigned is only available with --no-upload and can never upload an unsigned Desktop artifact.");
|
|
65
|
+
await context.requireOperationalConfiguration(platform, {
|
|
66
|
+
requireR2: remote ? false : !skipUpload,
|
|
67
|
+
requireSigning: !remote,
|
|
68
|
+
});
|
|
69
|
+
if (remote && ["list", "status", "cancel", "retry"].includes(subcommand)) {
|
|
70
|
+
const config = await loadConfig(context.root);
|
|
71
|
+
const remoteState = state;
|
|
72
|
+
if (subcommand === "list") {
|
|
73
|
+
context.printValue(await listRemoteBuilds(config, remoteState));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const id = context.args[0];
|
|
77
|
+
assert(id, "CLI_BUILD_ID_REQUIRED", `A build id is required for ${subcommand}.`);
|
|
78
|
+
const job = subcommand === "status"
|
|
79
|
+
? await getRemoteBuild(config, id)
|
|
80
|
+
: subcommand === "cancel"
|
|
81
|
+
? await cancelRemoteBuild(config, id)
|
|
82
|
+
: await retryRemoteBuild(config, id);
|
|
83
|
+
if (subcommand !== "status") {
|
|
84
|
+
builds.restore([
|
|
85
|
+
...builds.list().filter((candidate) => candidate.id !== job.id),
|
|
86
|
+
job,
|
|
87
|
+
]);
|
|
88
|
+
await saveState(state, repository, builds, submissions);
|
|
89
|
+
}
|
|
90
|
+
context.printValue(job);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (subcommand === "list") {
|
|
94
|
+
context.printValue(builds.list());
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const id = context.args[0];
|
|
98
|
+
if (subcommand === "status") {
|
|
99
|
+
context.printValue(builds.get(id ?? ""));
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (subcommand === "cancel") {
|
|
103
|
+
const job = builds.cancel(id ?? "");
|
|
104
|
+
await saveState(state, repository, builds, submissions);
|
|
105
|
+
context.printValue(job);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (subcommand === "retry") {
|
|
109
|
+
const job = builds.retry(id ?? "");
|
|
110
|
+
await saveState(state, repository, builds, submissions);
|
|
111
|
+
context.printValue(job);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
assert(subcommand === "create" || buildAll, "CLI_BUILD_COMMAND", `Unknown build command: ${subcommand}`);
|
|
115
|
+
const config = await loadConfig(context.root);
|
|
116
|
+
const profile = context.flag("--profile", simulator ? "simulator" : "production");
|
|
117
|
+
const simulatorDevice = context.flag("--device") ?? undefined;
|
|
118
|
+
const simulatorAutostart = simulator &&
|
|
119
|
+
!context.args.includes("--no-autostart") &&
|
|
120
|
+
(context.args.includes("--autostart") ||
|
|
121
|
+
(!context.json && context.ui.interactive));
|
|
122
|
+
const wait = !context.args.includes("--no-wait");
|
|
123
|
+
const local = context.args.includes("--local");
|
|
124
|
+
const platforms = buildAll
|
|
125
|
+
? ["android", "ios", "harmony", "web", "desktop"]
|
|
126
|
+
: [platform];
|
|
127
|
+
if (buildAll && wait && !local && !remote) {
|
|
128
|
+
assert(process.platform === "darwin", "BUILD_ALL_MACOS_REQUIRED", "A real all-target build includes iOS and therefore requires macOS locally. Run supported targets individually on Windows/Linux, or use a macOS CI worker for the complete matrix.");
|
|
129
|
+
for (const target of platforms)
|
|
130
|
+
await ensureNativeHostForBuild(context.projectCommandContext, target, profile, config);
|
|
131
|
+
}
|
|
132
|
+
if (remote) {
|
|
133
|
+
const loaded = { state, repository, builds, submissions };
|
|
134
|
+
if (buildAll) {
|
|
135
|
+
const source = await prepareRemoteSource(context.root, config, state);
|
|
136
|
+
await ensureRemoteTarget(config, state);
|
|
137
|
+
const outcomes = await Promise.all(platforms.map((target) => executeRemoteBuild({
|
|
138
|
+
root: context.root,
|
|
139
|
+
config,
|
|
140
|
+
state,
|
|
141
|
+
loaded,
|
|
142
|
+
platform: target,
|
|
143
|
+
profile,
|
|
144
|
+
wait,
|
|
145
|
+
source,
|
|
146
|
+
printValue: context.printValue,
|
|
147
|
+
ui: context.ui,
|
|
148
|
+
})));
|
|
149
|
+
context.printValue({
|
|
150
|
+
status: outcomes.every((job) => job.state === "success")
|
|
151
|
+
? "success"
|
|
152
|
+
: outcomes.some((job) => ["failed", "timed_out"].includes(job.state))
|
|
153
|
+
? "failed"
|
|
154
|
+
: "queued",
|
|
155
|
+
builds: outcomes,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
await executeRemoteBuild({
|
|
160
|
+
root: context.root,
|
|
161
|
+
config,
|
|
162
|
+
state,
|
|
163
|
+
loaded,
|
|
164
|
+
platform,
|
|
165
|
+
profile,
|
|
166
|
+
wait,
|
|
167
|
+
printValue: context.printValue,
|
|
168
|
+
ui: context.ui,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const buildOptions = {
|
|
174
|
+
root: context.root,
|
|
175
|
+
ui: context.ui,
|
|
176
|
+
json: context.json,
|
|
177
|
+
ensureNativeHostForBuild: (target, selectedProfile, selectedConfig) => ensureNativeHostForBuild(context.projectCommandContext, target, selectedProfile, selectedConfig),
|
|
178
|
+
requireAutolinkReady: context.requireAutolinkReady,
|
|
179
|
+
configuredProjectId: context.configuredProjectId,
|
|
180
|
+
printValue: context.printValue,
|
|
181
|
+
config,
|
|
182
|
+
profile,
|
|
183
|
+
platform,
|
|
184
|
+
skipUpload,
|
|
185
|
+
allowUnsigned,
|
|
186
|
+
wait,
|
|
187
|
+
local,
|
|
188
|
+
simulator,
|
|
189
|
+
simulatorDevice,
|
|
190
|
+
simulatorAutostart,
|
|
191
|
+
state,
|
|
192
|
+
repository,
|
|
193
|
+
builds,
|
|
194
|
+
submissions,
|
|
195
|
+
};
|
|
196
|
+
if (!buildAll) {
|
|
197
|
+
await executeBuild(buildOptions);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (buildAll && wait && !local)
|
|
201
|
+
await context.buildSharedLynxBundle(resolveProfile(config, profile).miso);
|
|
202
|
+
await runAllBuilds(context, {
|
|
203
|
+
...buildOptions,
|
|
204
|
+
platforms,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
async function runAllBuilds(context, options) {
|
|
208
|
+
const progress = options.ui.progress("All Lynx targets build");
|
|
209
|
+
const progressValues = {};
|
|
210
|
+
const progressLabels = {};
|
|
211
|
+
const platformName = (target) => target === "android"
|
|
212
|
+
? "Android"
|
|
213
|
+
: target === "ios"
|
|
214
|
+
? "iOS"
|
|
215
|
+
: target === "harmony"
|
|
216
|
+
? "HarmonyOS"
|
|
217
|
+
: target === "web"
|
|
218
|
+
? "Web"
|
|
219
|
+
: "Desktop";
|
|
220
|
+
const outcomes = await Promise.allSettled(options.platforms.map((target) => executeBuild({
|
|
221
|
+
...options,
|
|
222
|
+
platform: target,
|
|
223
|
+
progress,
|
|
224
|
+
progressPrefix: platformName(target),
|
|
225
|
+
skipBundleBuild: options.wait && !options.local && target !== "web",
|
|
226
|
+
onEvent: (message) => progress.event(`${platformName(target)} · ${message}`),
|
|
227
|
+
onProgress: (value, label) => {
|
|
228
|
+
if (value !== undefined)
|
|
229
|
+
progressValues[target] = value;
|
|
230
|
+
if (label)
|
|
231
|
+
progressLabels[target] = label;
|
|
232
|
+
const average = options.platforms.reduce((total, current) => total + (progressValues[current] ?? 0), 0) / options.platforms.length;
|
|
233
|
+
progress.update(average, `${platformName(target)} · ${progressLabels[target] ?? ""}`);
|
|
234
|
+
},
|
|
235
|
+
}, false)));
|
|
236
|
+
progress.update(100, "All Lynx target builds finished");
|
|
237
|
+
progress.stop();
|
|
238
|
+
const summaryBuilds = outcomes.map((outcome, index) => {
|
|
239
|
+
if (outcome.status === "fulfilled")
|
|
240
|
+
return outcome.value;
|
|
241
|
+
const error = outcome.reason;
|
|
242
|
+
const buildId = error && typeof error === "object" && "buildId" in error
|
|
243
|
+
? String(error.buildId)
|
|
244
|
+
: undefined;
|
|
245
|
+
const job = buildId ? options.builds.jobs.get(buildId) : undefined;
|
|
246
|
+
return (job ?? {
|
|
247
|
+
platform: options.platforms[index] ?? "android",
|
|
248
|
+
state: "failed",
|
|
249
|
+
error: error instanceof Error ? error.message : String(error),
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
const failed = summaryBuilds.some((result) => result.state === "failed");
|
|
253
|
+
context.printValue({
|
|
254
|
+
status: failed
|
|
255
|
+
? "failed"
|
|
256
|
+
: summaryBuilds.every((result) => result.state === "success")
|
|
257
|
+
? "success"
|
|
258
|
+
: "queued",
|
|
259
|
+
builds: summaryBuilds,
|
|
260
|
+
}, {
|
|
261
|
+
title: "Build all result",
|
|
262
|
+
rows: summaryBuilds.map((result) => ({
|
|
263
|
+
label: platformName(result.platform),
|
|
264
|
+
value: `${result.state}${"id" in result ? ` · ${result.id}` : ""}`,
|
|
265
|
+
valueColor: result.state === "success"
|
|
266
|
+
? "green"
|
|
267
|
+
: result.state === "failed"
|
|
268
|
+
? "red"
|
|
269
|
+
: "yellow",
|
|
270
|
+
})),
|
|
271
|
+
done: failed
|
|
272
|
+
? "At least one platform build failed. Review its events and retry that platform."
|
|
273
|
+
: "All Lynx target build jobs completed. Submit supported store artifacts separately.",
|
|
274
|
+
});
|
|
275
|
+
for (const result of summaryBuilds)
|
|
276
|
+
if (result.state === "success" &&
|
|
277
|
+
"artifact" in result &&
|
|
278
|
+
result.artifact?.url)
|
|
279
|
+
options.ui.downloadArtifact(result.artifact.url, result.artifact.expiresAt);
|
|
280
|
+
if (failed)
|
|
281
|
+
process.exitCode = 5;
|
|
282
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type MobilePlatform, type Platform } from "@lynxship/contracts";
|
|
2
|
+
import { type BuildProfile, type LynxShipConfig } from "../config.js";
|
|
3
|
+
import { type BoxRow } from "../ui/index.js";
|
|
4
|
+
import { prompt } from "../prompt.js";
|
|
5
|
+
import { requireAutolinkReady } from "../autolink.js";
|
|
6
|
+
interface View {
|
|
7
|
+
title: string;
|
|
8
|
+
rows: BoxRow[];
|
|
9
|
+
done: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function createCliRuntime(rawArgs: string[]): {
|
|
12
|
+
rawArgs: string[];
|
|
13
|
+
args: string[];
|
|
14
|
+
ui: import("../ui/index.js").CliUi;
|
|
15
|
+
json: boolean;
|
|
16
|
+
root: string;
|
|
17
|
+
flag: (name: string, fallback?: string | null) => string | null;
|
|
18
|
+
projectCommandContext: {
|
|
19
|
+
root: string;
|
|
20
|
+
ui: import("../ui/index.js").CliUi;
|
|
21
|
+
flag: (name: string, fallback?: string | null) => string | null;
|
|
22
|
+
prompt: typeof prompt;
|
|
23
|
+
};
|
|
24
|
+
commandContext: {
|
|
25
|
+
root: string;
|
|
26
|
+
args: string[];
|
|
27
|
+
ui: import("../ui/index.js").CliUi;
|
|
28
|
+
json: boolean;
|
|
29
|
+
flag: (name: string, fallback?: string | null) => string | null;
|
|
30
|
+
project: {
|
|
31
|
+
root: string;
|
|
32
|
+
ui: import("../ui/index.js").CliUi;
|
|
33
|
+
flag: (name: string, fallback?: string | null) => string | null;
|
|
34
|
+
prompt: typeof prompt;
|
|
35
|
+
};
|
|
36
|
+
printValue: (value: unknown, view?: View) => void;
|
|
37
|
+
mobilePlatformValue: (value: string) => MobilePlatform;
|
|
38
|
+
};
|
|
39
|
+
printValue: (value: unknown, view?: View) => void;
|
|
40
|
+
assertInteractivePrompt: (label: string, fallback: string, optionName: string) => Promise<string>;
|
|
41
|
+
requireProjectRoot: () => Promise<void>;
|
|
42
|
+
readConfigurationStatus: () => Promise<{
|
|
43
|
+
r2: boolean;
|
|
44
|
+
android: boolean;
|
|
45
|
+
}>;
|
|
46
|
+
requireOperationalConfiguration: (platform: Platform, options?: {
|
|
47
|
+
requireR2?: boolean;
|
|
48
|
+
requireSigning?: boolean;
|
|
49
|
+
}) => Promise<void>;
|
|
50
|
+
requireR2Configuration: () => Promise<void>;
|
|
51
|
+
configuredProjectId: (config: LynxShipConfig) => string;
|
|
52
|
+
mobilePlatformValue: (value: string) => MobilePlatform;
|
|
53
|
+
renderConfigurationFooter: () => Promise<void>;
|
|
54
|
+
buildSharedLynxBundle: (miso: BuildProfile["miso"]) => Promise<void>;
|
|
55
|
+
initSelfHost: () => Promise<{
|
|
56
|
+
status: string;
|
|
57
|
+
file: string;
|
|
58
|
+
}>;
|
|
59
|
+
requireAutolinkReady: typeof requireAutolinkReady;
|
|
60
|
+
};
|
|
61
|
+
export type CliRuntime = ReturnType<typeof createCliRuntime>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItD,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE;;;;;;iBAQ5B,MAAM,aAAY,MAAM,GAAG,IAAI,KAAU,MAAM,GAAG,IAAI;;;;qBAAtD,MAAM,aAAY,MAAM,GAAG,IAAI,KAAU,MAAM,GAAG,IAAI;;;;;;;;qBAAtD,MAAM,aAAY,MAAM,GAAG,IAAI,KAAU,MAAM,GAAG,IAAI;;;;yBAAtD,MAAM,aAAY,MAAM,GAAG,IAAI,KAAU,MAAM,GAAG,IAAI;;;4BAG/C,OAAO,SAAS,IAAI,KAAG,IAAI;qCAyGlB,MAAM,KAAG,cAAc;;wBAzGhC,OAAO,SAAS,IAAI,KAAG,IAAI;qCAkB7C,MAAM,YACH,MAAM,cACJ,MAAM,KACjB,OAAO,CAAC,MAAM,CAAC;8BASmB,OAAO,CAAC,IAAI,CAAC;mCAQR,OAAO,CAAC;QAChD,EAAE,EAAE,OAAO,CAAC;QACZ,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;gDA0BU,QAAQ,YACT;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,KACzD,OAAO,CAAC,IAAI,CAAC;kCAiByB,OAAO,CAAC,IAAI,CAAC;kCAUjB,cAAc,KAAG,MAAM;iCASxB,MAAM,KAAG,cAAc;qCAUf,OAAO,CAAC,IAAI,CAAC;kCA+BjD,YAAY,CAAC,MAAM,CAAC,KACzB,OAAO,CAAC,IAAI,CAAC;wBAkBe,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;;EAsDzE;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|