muon-ui 0.26.0 → 0.26.47
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 +5 -0
- package/android.d.ts +4 -4
- package/dist/android/lib/index.cjs +13 -10
- package/dist/android/lib/index.cjs.map +1 -1
- package/dist/android/lib/index.mjs +14 -11
- package/dist/android/lib/index.mjs.map +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.aar +0 -0
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.aar.md5 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.aar.sha1 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.aar.sha256 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.aar.sha512 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.module +10 -10
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.module.md5 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.module.sha1 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.module.sha256 +1 -1
- package/dist/android/maven/dev/muon/runtime/0.1.0/runtime-0.1.0.module.sha512 +1 -1
- package/dist/android/maven/dev/muon/runtime/maven-metadata.xml +1 -1
- package/dist/android/maven/dev/muon/runtime/maven-metadata.xml.md5 +1 -1
- package/dist/android/maven/dev/muon/runtime/maven-metadata.xml.sha1 +1 -1
- package/dist/android/maven/dev/muon/runtime/maven-metadata.xml.sha256 +1 -1
- package/dist/android/maven/dev/muon/runtime/maven-metadata.xml.sha512 +1 -1
- package/dist/android/renderer/renderer.js +41 -14
- package/dist/android/renderer/renderer.js.map +1 -1
- package/dist/cli.cjs +82 -56
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/native/linux-amd64/muon-builder +0 -0
- package/dist/native/linux-amd64/muon-launcher +0 -0
- package/dist/native/linux-amd64/muon-runtime-helper +0 -0
- package/dist/native/linux-arm64/muon-builder +0 -0
- package/dist/native/linux-arm64/muon-launcher +0 -0
- package/dist/native/linux-arm64/muon-runtime-helper +0 -0
- package/dist/native/linux-armhf/muon-builder +0 -0
- package/dist/native/linux-armhf/muon-launcher +0 -0
- package/dist/native/linux-armhf/muon-runtime-helper +0 -0
- package/dist/native/windows-amd64/muon-builder.exe +0 -0
- package/dist/native/windows-amd64/muon-launcher.exe +0 -0
- package/dist/native/windows-amd64/muon-plugin-inspector.exe +0 -0
- package/dist/native/windows-i686/muon-builder.exe +0 -0
- package/dist/native/windows-i686/muon-launcher.exe +0 -0
- package/dist/native/windows-i686/muon-plugin-inspector.exe +0 -0
- package/dist/runtime/linux-amd64/libmuon-ui.so +0 -0
- package/dist/runtime/linux-amd64/muon-core +0 -0
- package/dist/runtime/linux-amd64/plugins/node-bridge.mjs +5 -5
- package/dist/runtime/linux-amd64/plugins/node.so +0 -0
- package/dist/runtime/linux-arm64/libmuon-ui.so +0 -0
- package/dist/runtime/linux-arm64/muon-core +0 -0
- package/dist/runtime/linux-arm64/plugins/node-bridge.mjs +5 -5
- package/dist/runtime/linux-arm64/plugins/node.so +0 -0
- package/dist/runtime/linux-armhf/libmuon-ui.so +0 -0
- package/dist/runtime/linux-armhf/muon-core +0 -0
- package/dist/runtime/linux-armhf/plugins/node-bridge.mjs +5 -5
- package/dist/runtime/linux-armhf/plugins/node.so +0 -0
- package/dist/runtime/windows-amd64/libcardio.dll +0 -0
- package/dist/runtime/windows-amd64/libmuon-ui.dll +0 -0
- package/dist/runtime/windows-amd64/muon-core.exe +0 -0
- package/dist/runtime/windows-amd64/plugins/node-bridge.mjs +5 -5
- package/dist/runtime/windows-amd64/plugins/node.dll +0 -0
- package/dist/runtime/windows-i686/libcardio.dll +0 -0
- package/dist/runtime/windows-i686/libmuon-ui.dll +0 -0
- package/dist/runtime/windows-i686/muon-core.exe +0 -0
- package/dist/runtime/windows-i686/plugins/node-bridge.mjs +5 -5
- package/dist/runtime/windows-i686/plugins/node.dll +0 -0
- package/dist/{vite-internals-DseKep-X.cjs → vite-internals-CueaxMaY.cjs} +4225 -1963
- package/dist/vite-internals-CueaxMaY.cjs.map +1 -0
- package/dist/vite.cjs +100 -1294
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +6102 -5128
- package/dist/vite.mjs.map +1 -1
- package/images/get-started-android.png +0 -0
- package/muon-virtual-modules.d.ts +53 -0
- package/package.json +13 -13
- package/vite.d.ts +8 -0
- package/dist/vite-internals-DseKep-X.cjs.map +0 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*!
|
|
3
3
|
* name: muon-ui
|
|
4
|
-
* version: 0.26.
|
|
4
|
+
* version: 0.26.47
|
|
5
5
|
* description: A multi-platform GUI application framework that uses CEF as its backend
|
|
6
6
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
7
7
|
* license: MIT
|
|
8
8
|
* repository.url: https://github.com/kekyo/muon-ui.git
|
|
9
|
-
* git.commit.hash:
|
|
9
|
+
* git.commit.hash: 95dc2712686873c8a022483fd9abf18598019bd7
|
|
10
10
|
*/
|
|
11
|
-
const require_vite_internals = require("./vite-internals-
|
|
11
|
+
const require_vite_internals = require("./vite-internals-CueaxMaY.cjs");
|
|
12
12
|
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
let node_path = require("node:path");
|
|
14
|
-
let node_child_process = require("node:child_process");
|
|
15
14
|
let node_fs = require("node:fs");
|
|
15
|
+
let node_child_process = require("node:child_process");
|
|
16
16
|
let adm_zip = require("adm-zip");
|
|
17
17
|
adm_zip = require_vite_internals.__toESM(adm_zip, 1);
|
|
18
18
|
let commander = require("commander");
|
|
19
19
|
let tar_vern = require("tar-vern");
|
|
20
|
-
//#region
|
|
20
|
+
//#region cef/dev.ts
|
|
21
21
|
var import_dist = require_vite_internals.require_dist();
|
|
22
22
|
var muonRecycleExitCode = 88;
|
|
23
23
|
var defaultProjectConfigFileNames = [
|
|
@@ -353,12 +353,55 @@ var runMuonDev = async (options = {}) => {
|
|
|
353
353
|
while (result.exitCode === muonRecycleExitCode);
|
|
354
354
|
return result;
|
|
355
355
|
};
|
|
356
|
+
var isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
357
|
+
var readJsonObjectFile = async (path) => {
|
|
358
|
+
const parsed = (0, import_dist.parse)(await (0, node_fs_promises.readFile)(path, "utf8"));
|
|
359
|
+
if (!isJsonObject(parsed)) throw new Error(`JSON file must contain an object: ${path}`);
|
|
360
|
+
return parsed;
|
|
361
|
+
};
|
|
362
|
+
/**
|
|
363
|
+
* Reads package.json for application packaging.
|
|
364
|
+
* @param root - Application project directory.
|
|
365
|
+
* @returns Parsed package metadata.
|
|
366
|
+
*/
|
|
367
|
+
var readPackageJson = async (root) => {
|
|
368
|
+
return await readJsonObjectFile((0, node_path.join)(root, "package.json"));
|
|
369
|
+
};
|
|
370
|
+
var sanitizePackageName = (value) => {
|
|
371
|
+
const sanitized = (value.startsWith("@") ? value.slice(value.indexOf("/") + 1) : value).trim().toLowerCase().replace(/[^a-z0-9+.-]+/g, "-").replace(/^[.+-]+/g, "").replace(/[.+-]+$/g, "");
|
|
372
|
+
return sanitized.length > 0 ? sanitized : "muon-app";
|
|
373
|
+
};
|
|
374
|
+
var stringifyAuthor = (value) => {
|
|
375
|
+
if (typeof value === "string") return value;
|
|
376
|
+
if (!isJsonObject(value) || typeof value.name !== "string") return;
|
|
377
|
+
return value.email === void 0 || typeof value.email !== "string" ? value.name : `${value.name} <${value.email}>`;
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Resolves package identity and attribution from options and project metadata.
|
|
381
|
+
* @param packageJson - Application package metadata.
|
|
382
|
+
* @param options - Explicit packaging overrides.
|
|
383
|
+
* @returns Validated name, version, description and author.
|
|
384
|
+
*/
|
|
385
|
+
var resolveMetadata = (packageJson, options) => {
|
|
386
|
+
const packageNameSource = options.packageName ?? (typeof packageJson.name === "string" ? packageJson.name : void 0);
|
|
387
|
+
if (packageNameSource === void 0 || packageNameSource.trim() === "") throw new Error("package.json name is required for muon pack.");
|
|
388
|
+
const version = options.packageVersion ?? (typeof packageJson.version === "string" ? packageJson.version : void 0);
|
|
389
|
+
if (version === void 0 || version.trim() === "") throw new Error("package.json version is required for muon pack.");
|
|
390
|
+
const description = options.description ?? (typeof packageJson.description === "string" ? packageJson.description : "muon application");
|
|
391
|
+
const author = options.author ?? stringifyAuthor(packageJson.author) ?? "Unknown";
|
|
392
|
+
return {
|
|
393
|
+
packageName: sanitizePackageName(packageNameSource),
|
|
394
|
+
version,
|
|
395
|
+
description,
|
|
396
|
+
author
|
|
397
|
+
};
|
|
398
|
+
};
|
|
356
399
|
//#endregion
|
|
357
|
-
//#region
|
|
400
|
+
//#region cef/pack.ts
|
|
358
401
|
var AdmZip = __resolveDefaultExport(adm_zip.default, false);
|
|
359
|
-
globalThis.
|
|
402
|
+
globalThis.__screwUpIsInCJS_e260eb7ee8b5 = true;
|
|
360
403
|
function __resolveDefaultExport(module, isESM) {
|
|
361
|
-
const __isInCJS = typeof globalThis !== "undefined" && globalThis.
|
|
404
|
+
const __isInCJS = typeof globalThis !== "undefined" && globalThis.__screwUpIsInCJS_e260eb7ee8b5 === true;
|
|
362
405
|
const maybe = module;
|
|
363
406
|
const hasDefault = !!(maybe && typeof maybe === "object" && "default" in maybe);
|
|
364
407
|
const unwrapNamespaceDefault = (value) => {
|
|
@@ -382,7 +425,6 @@ var supportedPackTypes = [
|
|
|
382
425
|
"nsis"
|
|
383
426
|
];
|
|
384
427
|
var supportedLinuxSandboxModes = ["disabled", "setuid"];
|
|
385
|
-
var defaultArtifactsDirectory = "artifacts";
|
|
386
428
|
var defaultPackageBuildDirectory = ".muon/pack";
|
|
387
429
|
var systemRuntimeRoot = "/var/lib/muon/apps";
|
|
388
430
|
var systemCefCacheRoot = "/var/cache/muon/cef";
|
|
@@ -426,38 +468,6 @@ var requireDesktopTarget = (target) => {
|
|
|
426
468
|
if (target.target === "android") throw new Error("Android requires APK packaging.");
|
|
427
469
|
return target;
|
|
428
470
|
};
|
|
429
|
-
var isJsonObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
430
|
-
var readJsonObjectFile = async (path) => {
|
|
431
|
-
const parsed = (0, import_dist.parse)(await (0, node_fs_promises.readFile)(path, "utf8"));
|
|
432
|
-
if (!isJsonObject(parsed)) throw new Error(`JSON file must contain an object: ${path}`);
|
|
433
|
-
return parsed;
|
|
434
|
-
};
|
|
435
|
-
var readPackageJson = async (root) => {
|
|
436
|
-
return await readJsonObjectFile((0, node_path.join)(root, "package.json"));
|
|
437
|
-
};
|
|
438
|
-
var sanitizePackageName = (value) => {
|
|
439
|
-
const sanitized = (value.startsWith("@") ? value.slice(value.indexOf("/") + 1) : value).trim().toLowerCase().replace(/[^a-z0-9+.-]+/g, "-").replace(/^[.+-]+/g, "").replace(/[.+-]+$/g, "");
|
|
440
|
-
return sanitized.length > 0 ? sanitized : "muon-app";
|
|
441
|
-
};
|
|
442
|
-
var stringifyAuthor = (value) => {
|
|
443
|
-
if (typeof value === "string") return value;
|
|
444
|
-
if (!isJsonObject(value) || typeof value.name !== "string") return;
|
|
445
|
-
return value.email === void 0 || typeof value.email !== "string" ? value.name : `${value.name} <${value.email}>`;
|
|
446
|
-
};
|
|
447
|
-
var resolveMetadata = (packageJson, options) => {
|
|
448
|
-
const packageNameSource = options.packageName ?? (typeof packageJson.name === "string" ? packageJson.name : void 0);
|
|
449
|
-
if (packageNameSource === void 0 || packageNameSource.trim() === "") throw new Error("package.json name is required for muon pack.");
|
|
450
|
-
const version = options.packageVersion ?? (typeof packageJson.version === "string" ? packageJson.version : void 0);
|
|
451
|
-
if (version === void 0 || version.trim() === "") throw new Error("package.json version is required for muon pack.");
|
|
452
|
-
const description = options.description ?? (typeof packageJson.description === "string" ? packageJson.description : "muon application");
|
|
453
|
-
const author = options.author ?? stringifyAuthor(packageJson.author) ?? "Unknown";
|
|
454
|
-
return {
|
|
455
|
-
packageName: sanitizePackageName(packageNameSource),
|
|
456
|
-
version,
|
|
457
|
-
description,
|
|
458
|
-
author
|
|
459
|
-
};
|
|
460
|
-
};
|
|
461
471
|
var createPackMetadataPackageJson = (packageJson, metadata) => ({
|
|
462
472
|
...packageJson,
|
|
463
473
|
version: metadata.version
|
|
@@ -1007,7 +1017,7 @@ var packDesktopMuonApp = async (options, project) => {
|
|
|
1007
1017
|
const root = project.root;
|
|
1008
1018
|
const packageJson = await readPackageJson(root);
|
|
1009
1019
|
const metadata = resolveMetadata(packageJson, options);
|
|
1010
|
-
const artifactsRoot = (0, node_path.resolve)(root, options.artifactsDir ??
|
|
1020
|
+
const artifactsRoot = (0, node_path.resolve)(root, options.artifactsDir ?? "artifacts");
|
|
1011
1021
|
const packageBuildRoot = (0, node_path.resolve)(root, defaultPackageBuildDirectory);
|
|
1012
1022
|
const types = normalizePackTypes(options.types);
|
|
1013
1023
|
const linuxSandbox = normalizeLinuxSandboxMode(options.linuxSandbox);
|
|
@@ -1142,18 +1152,18 @@ var packDesktopMuonApp = async (options, project) => {
|
|
|
1142
1152
|
artifacts
|
|
1143
1153
|
};
|
|
1144
1154
|
};
|
|
1155
|
+
//#endregion
|
|
1156
|
+
//#region android/pack.ts
|
|
1145
1157
|
/**
|
|
1146
|
-
*
|
|
1147
|
-
* @param options -
|
|
1148
|
-
* @
|
|
1158
|
+
* Packages a verified release APK for an explicitly selected Android target.
|
|
1159
|
+
* @param options - Project metadata, signing and artifact output options.
|
|
1160
|
+
* @param project - Resolved project and Vite build settings.
|
|
1161
|
+
* @param targets - Normalized targets requested by the caller.
|
|
1162
|
+
* @param types - Requested artifact types, or undefined for APK output.
|
|
1163
|
+
* @returns The signed application and its distributable APK artifact.
|
|
1149
1164
|
*/
|
|
1150
|
-
var
|
|
1165
|
+
var packAndroidMuonApp = async (options, project, targets, types) => {
|
|
1151
1166
|
const cwd = (0, node_path.resolve)(options.root ?? process.cwd());
|
|
1152
|
-
const project = await require_vite_internals.loadMuonBuildSequenceProject(cwd);
|
|
1153
|
-
const plugin = require_vite_internals.resolveMuonViteBuildOptions(project.pluginOptions);
|
|
1154
|
-
const targets = [...new Set((options.allTargets === true ? [...require_vite_internals.allMuonTargets] : options.targets ?? plugin.targets ?? []).flatMap((target) => target.split(",")).map((target) => target.trim().toLowerCase()))];
|
|
1155
|
-
const types = options.types?.flatMap((type) => type.split(",")).map((type) => type.trim().toLowerCase());
|
|
1156
|
-
if (!targets.includes("android") && !types?.includes("apk")) return await packDesktopMuonApp(options, project);
|
|
1157
1167
|
if (options.allTargets === true || targets.length !== 1 || targets[0] !== "android") throw new Error("APK packaging requires only --target android.");
|
|
1158
1168
|
if (types !== void 0 && (types.length === 0 || types.some((type) => type !== "apk"))) throw new Error("Android supports --type apk only.");
|
|
1159
1169
|
const root = project.root;
|
|
@@ -1171,7 +1181,7 @@ var packMuonApp = async (options) => {
|
|
|
1171
1181
|
}, project);
|
|
1172
1182
|
const target = build.targets[0];
|
|
1173
1183
|
if (target?.target !== "android" || target.signing !== "release") throw new Error("Android packaging did not produce a signed release APK.");
|
|
1174
|
-
const directory = (0, node_path.resolve)(root, options.artifactsDir ??
|
|
1184
|
+
const directory = (0, node_path.resolve)(root, options.artifactsDir ?? "artifacts", "apk");
|
|
1175
1185
|
await (0, node_fs_promises.mkdir)(directory, { recursive: true });
|
|
1176
1186
|
const path = (0, node_path.join)(directory, (0, node_path.basename)(target.packagePath));
|
|
1177
1187
|
await (0, node_fs_promises.copyFile)(target.packagePath, path);
|
|
@@ -1195,11 +1205,27 @@ var packMuonApp = async (options) => {
|
|
|
1195
1205
|
};
|
|
1196
1206
|
};
|
|
1197
1207
|
//#endregion
|
|
1198
|
-
//#region
|
|
1199
|
-
|
|
1200
|
-
|
|
1208
|
+
//#region common/pack.ts
|
|
1209
|
+
/**
|
|
1210
|
+
* Builds redistributable desktop packages or a verified, signed Android APK.
|
|
1211
|
+
* @param options - Target, artifact, project and signing options.
|
|
1212
|
+
* @returns Built distributions and the package files to distribute.
|
|
1213
|
+
*/
|
|
1214
|
+
var packMuonApp = async (options) => {
|
|
1215
|
+
const cwd = (0, node_path.resolve)(options.root ?? process.cwd());
|
|
1216
|
+
const project = await require_vite_internals.loadMuonBuildSequenceProject(cwd, options.targets);
|
|
1217
|
+
const plugin = require_vite_internals.resolveMuonViteBuildOptions(project.pluginOptions);
|
|
1218
|
+
const targets = [...new Set((options.allTargets === true ? [...require_vite_internals.allMuonTargets] : options.targets ?? plugin.targets ?? []).flatMap((target) => target.split(",")).map((target) => target.trim().toLowerCase()))];
|
|
1219
|
+
const types = options.types?.flatMap((type) => type.split(",")).map((type) => type.trim().toLowerCase());
|
|
1220
|
+
if (!targets.includes("android") && !types?.includes("apk")) return await packDesktopMuonApp(options, project);
|
|
1221
|
+
return await packAndroidMuonApp(options, project, targets, types);
|
|
1222
|
+
};
|
|
1223
|
+
//#endregion
|
|
1224
|
+
//#region common/generated/packageMetadata.ts
|
|
1225
|
+
var version = "0.26.47";
|
|
1226
|
+
var git_commit_hash = "95dc2712686873c8a022483fd9abf18598019bd7";
|
|
1201
1227
|
//#endregion
|
|
1202
|
-
//#region
|
|
1228
|
+
//#region common/cli.ts
|
|
1203
1229
|
var readTargetValues = (value) => {
|
|
1204
1230
|
return value.split(",").map((value) => value.trim()).filter((value) => value.length > 0);
|
|
1205
1231
|
};
|