@mirinjs/cli 0.1.0-alpha.15 → 0.1.0-alpha.16
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/package.json +8 -6
- package/src/artifacts.ts +4 -4
- package/src/build.ts +4 -0
- package/src/package/linux/package.ts +11 -3
- package/src/release.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirinjs/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.16",
|
|
4
4
|
"description": "CLI for mirin apps: dev, build, init.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,13 +27,15 @@
|
|
|
27
27
|
"bun": ">=1.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"create-mirinjs": "0.1.0-alpha.
|
|
31
|
-
"mirinjs": "0.1.0-alpha.
|
|
30
|
+
"create-mirinjs": "0.1.0-alpha.16",
|
|
31
|
+
"mirinjs": "0.1.0-alpha.16"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
|
-
"@mirinjs/darwin-arm64": "0.1.0-alpha.
|
|
35
|
-
"@mirinjs/win32-x64": "0.1.0-alpha.
|
|
36
|
-
"@mirinjs/
|
|
34
|
+
"@mirinjs/darwin-arm64": "0.1.0-alpha.16",
|
|
35
|
+
"@mirinjs/win32-x64": "0.1.0-alpha.16",
|
|
36
|
+
"@mirinjs/win32-arm64": "0.1.0-alpha.16",
|
|
37
|
+
"@mirinjs/linux-arm64": "0.1.0-alpha.16",
|
|
38
|
+
"@mirinjs/linux-x64": "0.1.0-alpha.16"
|
|
37
39
|
},
|
|
38
40
|
"publishConfig": {
|
|
39
41
|
"access": "public"
|
package/src/artifacts.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* entry from the `mirin` package, and a CEF framework downloaded once from
|
|
10
10
|
* the matching GitHub Release into `~/.mirinjs/cef/<version>`. No Rust needed.
|
|
11
11
|
*
|
|
12
|
-
* Alpha supports macOS arm64, Windows x64, and Linux x64.
|
|
12
|
+
* Alpha supports macOS arm64, Windows x64/arm64, and Linux x64/arm64.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {
|
|
@@ -89,11 +89,11 @@ function helperFileName(): string {
|
|
|
89
89
|
function assertSupportedPlatform(): void {
|
|
90
90
|
const supported =
|
|
91
91
|
(process.platform === "darwin" && process.arch === "arm64") ||
|
|
92
|
-
(process.platform === "win32" && process.arch === "x64") ||
|
|
93
|
-
(process.platform === "linux" && process.arch === "x64");
|
|
92
|
+
(process.platform === "win32" && (process.arch === "x64" || process.arch === "arm64")) ||
|
|
93
|
+
(process.platform === "linux" && (process.arch === "x64" || process.arch === "arm64"));
|
|
94
94
|
if (!supported) {
|
|
95
95
|
throw new Error(
|
|
96
|
-
"mirin alpha supports macOS arm64, Windows x64, and Linux x64 " +
|
|
96
|
+
"mirin alpha supports macOS arm64, Windows x64/arm64, and Linux x64/arm64 " +
|
|
97
97
|
`(got ${process.platform}/${process.arch}).`,
|
|
98
98
|
);
|
|
99
99
|
}
|
package/src/build.ts
CHANGED
|
@@ -121,6 +121,8 @@ export interface BuildResult {
|
|
|
121
121
|
channel: string;
|
|
122
122
|
/** Update baseUrl, if `release` is configured. */
|
|
123
123
|
baseUrl?: string;
|
|
124
|
+
/** Markdown release notes embedded in the updater manifest, if configured. */
|
|
125
|
+
releaseNotes?: string;
|
|
124
126
|
/** libmirin_core path (for the updater codec at release time). */
|
|
125
127
|
coreDylib: string;
|
|
126
128
|
/** Project root (so `mirin release` can resolve relative asset paths). */
|
|
@@ -183,6 +185,7 @@ export async function build(
|
|
|
183
185
|
const version = opts.version ?? appVersion(projectDir);
|
|
184
186
|
const channel: string = config.release?.channel ?? "stable";
|
|
185
187
|
const baseUrl: string | undefined = config.release?.baseUrl;
|
|
188
|
+
const releaseNotes: string | undefined = config.release?.notes;
|
|
186
189
|
const dmg: boolean | import("mirinjs").DmgConfig = config.dmg ?? true;
|
|
187
190
|
const nsis: boolean | import("mirinjs").NsisConfig = config.nsis ?? true;
|
|
188
191
|
const inno: boolean | import("mirinjs").InnoConfig = config.inno ?? true;
|
|
@@ -320,6 +323,7 @@ export async function build(
|
|
|
320
323
|
version,
|
|
321
324
|
channel,
|
|
322
325
|
baseUrl,
|
|
326
|
+
releaseNotes,
|
|
323
327
|
coreDylib: artifacts.coreDylib,
|
|
324
328
|
projectDir,
|
|
325
329
|
dmg,
|
|
@@ -137,7 +137,7 @@ async function buildFpm(
|
|
|
137
137
|
kind: "deb" | "rpm",
|
|
138
138
|
): Promise<LinuxPackageResult> {
|
|
139
139
|
const fpm = resolveFpm();
|
|
140
|
-
const arch = kind
|
|
140
|
+
const arch = linuxPackageArch(kind);
|
|
141
141
|
const fileName =
|
|
142
142
|
kind === "deb"
|
|
143
143
|
? `${binName}_${input.version}_${arch}.deb`
|
|
@@ -242,7 +242,8 @@ async function buildAppImage(
|
|
|
242
242
|
stageHicolorIcon(appDirRoot, input);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
const
|
|
245
|
+
const arch = linuxPackageArch("appimage");
|
|
246
|
+
const fileName = `${input.appName}-${input.version}-${arch}.AppImage`;
|
|
246
247
|
const out = join(input.outDir, fileName);
|
|
247
248
|
rmSync(out, { force: true });
|
|
248
249
|
|
|
@@ -250,7 +251,7 @@ async function buildAppImage(
|
|
|
250
251
|
// --appimage-extract-and-run: run appimagetool without FUSE. ARCH is required by
|
|
251
252
|
// appimagetool; NO_STRIP avoids stripping the Bun-compiled host (which would break it).
|
|
252
253
|
const res = await $`${appimagetool} --appimage-extract-and-run ${appDirRoot} ${out}`
|
|
253
|
-
.env({ ...process.env, ARCH:
|
|
254
|
+
.env({ ...process.env, ARCH: arch, NO_STRIP: "1" })
|
|
254
255
|
.nothrow()
|
|
255
256
|
.quiet();
|
|
256
257
|
rmSync(appDirRoot, { recursive: true, force: true });
|
|
@@ -261,6 +262,13 @@ async function buildAppImage(
|
|
|
261
262
|
return { format: "appimage", path: out, size: size(out) };
|
|
262
263
|
}
|
|
263
264
|
|
|
265
|
+
function linuxPackageArch(kind: "appimage" | "deb" | "rpm"): string {
|
|
266
|
+
if (process.arch === "arm64") {
|
|
267
|
+
return kind === "deb" ? "arm64" : "aarch64";
|
|
268
|
+
}
|
|
269
|
+
return kind === "deb" ? "amd64" : "x86_64";
|
|
270
|
+
}
|
|
271
|
+
|
|
264
272
|
/** Resolve the effective set of formats from config + an optional CLI/caller override. */
|
|
265
273
|
export function resolveLinuxFormats(
|
|
266
274
|
linux: boolean | LinuxConfig | undefined,
|
package/src/release.ts
CHANGED
|
@@ -166,6 +166,7 @@ export async function release(projectDir = process.cwd()): Promise<number> {
|
|
|
166
166
|
channel: result.channel,
|
|
167
167
|
platform,
|
|
168
168
|
arch,
|
|
169
|
+
body: result.releaseNotes,
|
|
169
170
|
tarHash,
|
|
170
171
|
bundle: { url: bundleName, sha256: bundleSha, size: bundleSize },
|
|
171
172
|
patches,
|