@lynxship/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -0
- package/dist/android-build.d.ts +14 -0
- package/dist/android-build.d.ts.map +1 -0
- package/dist/android-build.js +201 -0
- package/dist/artifact-name.d.ts +3 -0
- package/dist/artifact-name.d.ts.map +1 -0
- package/dist/artifact-name.js +4 -0
- package/dist/autolink.d.ts +14 -0
- package/dist/autolink.d.ts.map +1 -0
- package/dist/autolink.js +144 -0
- package/dist/config.d.ts +51 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +62 -0
- package/dist/configure.d.ts +11 -0
- package/dist/configure.d.ts.map +1 -0
- package/dist/configure.js +172 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1082 -0
- package/dist/ios-build.d.ts +13 -0
- package/dist/ios-build.d.ts.map +1 -0
- package/dist/ios-build.js +174 -0
- package/dist/ota-assets.d.ts +3 -0
- package/dist/ota-assets.d.ts.map +1 -0
- package/dist/ota-assets.js +48 -0
- package/dist/ota-doctor.d.ts +10 -0
- package/dist/ota-doctor.d.ts.map +1 -0
- package/dist/ota-doctor.js +53 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +12 -0
- package/dist/process-runner.d.ts +18 -0
- package/dist/process-runner.d.ts.map +1 -0
- package/dist/process-runner.js +97 -0
- package/dist/prompt.d.ts +3 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +58 -0
- package/dist/r2.d.ts +32 -0
- package/dist/r2.d.ts.map +1 -0
- package/dist/r2.js +135 -0
- package/dist/remote.d.ts +33 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +116 -0
- package/dist/runtime-fingerprint.d.ts +10 -0
- package/dist/runtime-fingerprint.d.ts.map +1 -0
- package/dist/runtime-fingerprint.js +238 -0
- package/dist/secure-store.d.ts +32 -0
- package/dist/secure-store.d.ts.map +1 -0
- package/dist/secure-store.js +263 -0
- package/dist/ui/colors.d.ts +24 -0
- package/dist/ui/colors.d.ts.map +1 -0
- package/dist/ui/colors.js +64 -0
- package/dist/ui/components.d.ts +36 -0
- package/dist/ui/components.d.ts.map +1 -0
- package/dist/ui/components.js +268 -0
- package/dist/ui/index.d.ts +24 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +68 -0
- package/dist/ui/logo.d.ts +3 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +32 -0
- package/dist/ui/state.d.ts +5 -0
- package/dist/ui/state.d.ts.map +1 -0
- package/dist/ui/state.js +7 -0
- package/dist/ui/terminal.d.ts +12 -0
- package/dist/ui/terminal.d.ts.map +1 -0
- package/dist/ui/terminal.js +23 -0
- package/package.json +75 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAEL,eAAe,EACf,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAEvB,qBAAa,KAAK;IAChB,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAElC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;gBAElB,IAAI,EAAE,MAAM,EAAE;IAU1B,MAAM,IAAI,IAAI;IAId,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAI5C,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAKzC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IAIvC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa;IAIpC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,UAAO,GAAG,IAAI;IAI3C,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;CAGxD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAEjD;AAED,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { finalLine, log, sectionHeader, summaryBox, createProgress, spin, downloadArtifact, } from "./components.js";
|
|
2
|
+
import { printBanner } from "./logo.js";
|
|
3
|
+
import { setColors } from "./state.js";
|
|
4
|
+
import { isInteractive, terminalOptions, } from "./terminal.js";
|
|
5
|
+
export class CliUi {
|
|
6
|
+
options;
|
|
7
|
+
interactive;
|
|
8
|
+
constructor(args) {
|
|
9
|
+
this.options = terminalOptions(args);
|
|
10
|
+
this.interactive = isInteractive(this.options);
|
|
11
|
+
setColors(!this.options.noColor &&
|
|
12
|
+
!this.options.json &&
|
|
13
|
+
(this.interactive || this.options.verbose));
|
|
14
|
+
}
|
|
15
|
+
banner() {
|
|
16
|
+
if (this.interactive)
|
|
17
|
+
printBanner();
|
|
18
|
+
}
|
|
19
|
+
header(title) {
|
|
20
|
+
if (this.interactive)
|
|
21
|
+
sectionHeader(title);
|
|
22
|
+
}
|
|
23
|
+
success(message) {
|
|
24
|
+
if (this.interactive && !this.options.quiet)
|
|
25
|
+
log.success(message);
|
|
26
|
+
}
|
|
27
|
+
warn(message) {
|
|
28
|
+
if (!this.options.json)
|
|
29
|
+
log.warn(message);
|
|
30
|
+
}
|
|
31
|
+
info(message) {
|
|
32
|
+
if (this.interactive && !this.options.quiet)
|
|
33
|
+
log.info(message);
|
|
34
|
+
}
|
|
35
|
+
debug(message) {
|
|
36
|
+
if (this.options.verbose && !this.options.json && !this.options.quiet)
|
|
37
|
+
log.debug(message);
|
|
38
|
+
}
|
|
39
|
+
error(message) {
|
|
40
|
+
if (!this.options.json)
|
|
41
|
+
log.error(message);
|
|
42
|
+
}
|
|
43
|
+
summary(title, rows) {
|
|
44
|
+
if (this.interactive)
|
|
45
|
+
summaryBox(title, rows);
|
|
46
|
+
}
|
|
47
|
+
configurationStatus(rows) {
|
|
48
|
+
if (this.interactive && !this.options.quiet)
|
|
49
|
+
summaryBox("Configuration status", rows);
|
|
50
|
+
}
|
|
51
|
+
progress(label) {
|
|
52
|
+
return createProgress(label, this.interactive && !this.options.quiet);
|
|
53
|
+
}
|
|
54
|
+
spinner(text) {
|
|
55
|
+
return spin(text, this.interactive && !this.options.quiet);
|
|
56
|
+
}
|
|
57
|
+
done(message, success = true) {
|
|
58
|
+
if (this.interactive)
|
|
59
|
+
finalLine(message, success);
|
|
60
|
+
}
|
|
61
|
+
downloadArtifact(url, expiresAt) {
|
|
62
|
+
downloadArtifact(url, expiresAt, this.interactive);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export function createCliUi(args) {
|
|
66
|
+
return new CliUi(args);
|
|
67
|
+
}
|
|
68
|
+
export { terminalOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../src/ui/logo.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,IAAI,QAAwD,CAAC;AAE1E,wBAAgB,WAAW,IAAI,IAAI,CAOlC"}
|
package/dist/ui/logo.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { c } from "./state.js";
|
|
3
|
+
const packageJson = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
4
|
+
const BRAILLE_LINES = [
|
|
5
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
6
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣆⠀⠀⢀⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
7
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣧⡀⣸⡿⠘⢿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
8
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⡇⠀⠈⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
9
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⠀⠀⠀⠸⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
10
|
+
"⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣇⣀⠀⠀⠀⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
11
|
+
"⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
12
|
+
"⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
13
|
+
"⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
14
|
+
"⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
15
|
+
"⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀",
|
|
16
|
+
"⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⢀⣀⣤⣤⣶⣶⣾⠟⠋⠉⠀⠀⠀",
|
|
17
|
+
"⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠲⣾⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀",
|
|
18
|
+
"⠀⠀⠀⠀⠙⠿⠿⠛⠛⠛⠛⠿⣿⣿⣿⣿⣿⣿⣶⣦⣤⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀",
|
|
19
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⣀⣠⣤⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀",
|
|
20
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⠟⠁⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀",
|
|
21
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡿⠋⠀⠀⢀⣤⣾⣿⠿⠟⠛⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
22
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡜⠁⠀⣠⡾⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
23
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⡠⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
24
|
+
"⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
|
|
25
|
+
];
|
|
26
|
+
export const LOGO = BRAILLE_LINES.map((line) => c.brand(line)).join("\n");
|
|
27
|
+
export function printBanner() {
|
|
28
|
+
console.log();
|
|
29
|
+
console.log(LOGO);
|
|
30
|
+
console.log(` ${c.brandBold("LynxShip")} ${c.dim(`v${packageJson.version}`)} ${c.muted("Deploy LynxJS apps with confidence")}`);
|
|
31
|
+
console.log();
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/ui/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,IAAI,CAAC,EAAE,SAA8B,CAAC;AAE7C,eAAO,IAAI,aAAa,SAAO,CAAC;AAEhC,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAGhD"}
|
package/dist/ui/state.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TerminalOptions {
|
|
2
|
+
json: boolean;
|
|
3
|
+
quiet: boolean;
|
|
4
|
+
verbose: boolean;
|
|
5
|
+
noColor: boolean;
|
|
6
|
+
nonInteractive: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function terminalOptions(args: string[]): TerminalOptions;
|
|
9
|
+
export declare function isInteractive(options: TerminalOptions): boolean;
|
|
10
|
+
export declare function supportsUnicode(): boolean;
|
|
11
|
+
export declare function terminalWidth(): number;
|
|
12
|
+
//# sourceMappingURL=terminal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../src/ui/terminal.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,eAAe,CAS/D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAQ/D;AAED,wBAAgB,eAAe,IAAI,OAAO,CAKzC;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function terminalOptions(args) {
|
|
2
|
+
return {
|
|
3
|
+
json: args.includes("--json"),
|
|
4
|
+
quiet: args.includes("--quiet"),
|
|
5
|
+
verbose: args.includes("--verbose"),
|
|
6
|
+
noColor: args.includes("--no-color") || Boolean(process.env.NO_COLOR),
|
|
7
|
+
nonInteractive: args.includes("--non-interactive") || process.env.CI === "1",
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export function isInteractive(options) {
|
|
11
|
+
return (Boolean(process.stdout.isTTY) &&
|
|
12
|
+
!options.json &&
|
|
13
|
+
!options.quiet &&
|
|
14
|
+
!options.noColor &&
|
|
15
|
+
!options.nonInteractive);
|
|
16
|
+
}
|
|
17
|
+
export function supportsUnicode() {
|
|
18
|
+
return (process.env.TERM !== "dumb" &&
|
|
19
|
+
process.env.TERM_PROGRAM !== "Apple_Terminal_legacy");
|
|
20
|
+
}
|
|
21
|
+
export function terminalWidth() {
|
|
22
|
+
return process.stdout.columns ?? 80;
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lynxship/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Build, sign, store, submit and update LynxJS applications from the terminal.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"lynxjs",
|
|
9
|
+
"lynx",
|
|
10
|
+
"mobile",
|
|
11
|
+
"android",
|
|
12
|
+
"ios",
|
|
13
|
+
"ota",
|
|
14
|
+
"build",
|
|
15
|
+
"cli"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=22.0.0"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"bin": {
|
|
28
|
+
"lynxship": "dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./config": {
|
|
36
|
+
"types": "./dist/config.d.ts",
|
|
37
|
+
"import": "./dist/config.js"
|
|
38
|
+
},
|
|
39
|
+
"./runtime-fingerprint": {
|
|
40
|
+
"types": "./dist/runtime-fingerprint.d.ts",
|
|
41
|
+
"import": "./dist/runtime-fingerprint.js"
|
|
42
|
+
},
|
|
43
|
+
"./autolink": {
|
|
44
|
+
"types": "./dist/autolink.d.ts",
|
|
45
|
+
"import": "./dist/autolink.js"
|
|
46
|
+
},
|
|
47
|
+
"./ui/*": {
|
|
48
|
+
"types": "./dist/ui/*.d.ts",
|
|
49
|
+
"import": "./dist/ui/*.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@aws-sdk/client-s3": "3.1116.0",
|
|
54
|
+
"@aws-sdk/lib-storage": "3.1116.0",
|
|
55
|
+
"@aws-sdk/s3-request-presigner": "3.1116.0",
|
|
56
|
+
"boxen": "8.0.1",
|
|
57
|
+
"chalk": "5.4.1",
|
|
58
|
+
"cli-progress": "3.12.0",
|
|
59
|
+
"ora": "8.2.0",
|
|
60
|
+
"qrcode-terminal": "0.12.0",
|
|
61
|
+
"@lynxship/signing": "0.1.0",
|
|
62
|
+
"@lynxship/contracts": "0.1.0",
|
|
63
|
+
"@lynxship/db": "0.1.0",
|
|
64
|
+
"@lynxship/build-orchestrator": "0.1.0",
|
|
65
|
+
"@lynxship/submit": "0.1.0"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@types/cli-progress": "3.11.6",
|
|
69
|
+
"@types/qrcode-terminal": "0.12.2"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "tsc -b tsconfig.json",
|
|
73
|
+
"typecheck": "tsc -b tsconfig.json --pretty false"
|
|
74
|
+
}
|
|
75
|
+
}
|