muon-ui 0.17.0 → 0.18.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/dist/cli.cjs +29 -12
- 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/muon-core +0 -0
- package/dist/runtime/linux-arm64/muon-core +0 -0
- package/dist/runtime/linux-armhf/muon-core +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-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/{vite-internals-BOAXlmwz.cjs → vite-internals-_Wv0-FW6.cjs} +15 -9
- package/dist/{vite-internals-BOAXlmwz.cjs.map → vite-internals-_Wv0-FW6.cjs.map} +1 -1
- package/dist/vite.cjs +6 -3
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +8 -4
- package/dist/vite.mjs.map +1 -1
- package/muon-virtual-modules.d.ts +5 -0
- package/muon.d.ts +6 -0
- package/package.json +7 -7
- package/vite.d.ts +22 -0
package/dist/cli.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*!
|
|
3
3
|
* name: muon-ui
|
|
4
|
-
* version: 0.
|
|
4
|
+
* version: 0.18.0
|
|
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: cf5b421289da62d14ebb01f7b15acc02ac6d7750
|
|
10
10
|
*/
|
|
11
|
-
const require_vite_internals = require("./vite-internals-
|
|
11
|
+
const require_vite_internals = require("./vite-internals-_Wv0-FW6.cjs");
|
|
12
12
|
let commander = require("commander");
|
|
13
13
|
let node_child_process = require("node:child_process");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -46,6 +46,7 @@ var isMissingVitePackageError = (error) => {
|
|
|
46
46
|
const candidate = error;
|
|
47
47
|
return candidate.code === "ERR_MODULE_NOT_FOUND" && typeof candidate.message === "string" && candidate.message.includes("vite");
|
|
48
48
|
};
|
|
49
|
+
var hasViteServerProxyConfiguration = (proxy) => typeof proxy === "object" && proxy !== null && Object.keys(proxy).length > 0;
|
|
49
50
|
var loadViteMuonOptions = async (cwd) => {
|
|
50
51
|
let vite;
|
|
51
52
|
try {
|
|
@@ -53,7 +54,8 @@ var loadViteMuonOptions = async (cwd) => {
|
|
|
53
54
|
} catch (error) {
|
|
54
55
|
if (isMissingVitePackageError(error)) return {
|
|
55
56
|
root: (0, node_path.resolve)(cwd),
|
|
56
|
-
pluginOptions: void 0
|
|
57
|
+
pluginOptions: void 0,
|
|
58
|
+
viteServerProxyConfigured: false
|
|
57
59
|
};
|
|
58
60
|
throw error;
|
|
59
61
|
}
|
|
@@ -65,7 +67,8 @@ var loadViteMuonOptions = async (cwd) => {
|
|
|
65
67
|
}, void 0, cwd, "silent");
|
|
66
68
|
if (loaded === null) return {
|
|
67
69
|
root: (0, node_path.resolve)(cwd),
|
|
68
|
-
pluginOptions: void 0
|
|
70
|
+
pluginOptions: void 0,
|
|
71
|
+
viteServerProxyConfigured: false
|
|
69
72
|
};
|
|
70
73
|
const config = loaded.config;
|
|
71
74
|
const root = typeof config.root === "string" ? (0, node_path.resolve)(cwd, config.root) : (0, node_path.resolve)(cwd);
|
|
@@ -73,7 +76,8 @@ var loadViteMuonOptions = async (cwd) => {
|
|
|
73
76
|
if (muonPlugins.length > 1) throw new Error("Multiple muon() plugin definitions were found in vite.config.*.");
|
|
74
77
|
return {
|
|
75
78
|
root,
|
|
76
|
-
pluginOptions: muonPlugins[0]
|
|
79
|
+
pluginOptions: muonPlugins[0],
|
|
80
|
+
viteServerProxyConfigured: hasViteServerProxyConfiguration(config.server?.proxy)
|
|
77
81
|
};
|
|
78
82
|
};
|
|
79
83
|
var getRuntimePluginConfigFromViteBuild = async (root) => {
|
|
@@ -129,7 +133,8 @@ var prepareViteRunAssets = async (cwd) => {
|
|
|
129
133
|
configPath: buildOptions.configPath,
|
|
130
134
|
assetSourcePath,
|
|
131
135
|
browserStartPage: packagedAssetOptions.browserStartPage,
|
|
132
|
-
runtimePluginConfig
|
|
136
|
+
runtimePluginConfig,
|
|
137
|
+
viteServerProxyConfigured: project.viteServerProxyConfigured
|
|
133
138
|
};
|
|
134
139
|
};
|
|
135
140
|
var resolveProjectConfigPath = async (root, configPath) => {
|
|
@@ -252,12 +257,14 @@ var runMuonExecutable = async (muonExecutablePath, configPaths, environment) =>
|
|
|
252
257
|
});
|
|
253
258
|
});
|
|
254
259
|
};
|
|
255
|
-
var runMuonDevOnce = async (options, cwd) => {
|
|
260
|
+
var runMuonDevOnce = async (options, cwd, reportViteServerProxyWarning) => {
|
|
256
261
|
const preparedViteAssets = options.assetSourcePath === void 0 ? await prepareViteRunAssets(cwd) : void 0;
|
|
257
262
|
const loadedViteOptions = preparedViteAssets === void 0 ? await loadViteMuonOptions(cwd) : {
|
|
258
263
|
root: preparedViteAssets.root,
|
|
259
|
-
pluginOptions: preparedViteAssets.pluginOptions
|
|
264
|
+
pluginOptions: preparedViteAssets.pluginOptions,
|
|
265
|
+
viteServerProxyConfigured: preparedViteAssets.viteServerProxyConfigured
|
|
260
266
|
};
|
|
267
|
+
if (loadedViteOptions.viteServerProxyConfigured) reportViteServerProxyWarning();
|
|
261
268
|
const root = loadedViteOptions.root;
|
|
262
269
|
const pluginOptions = loadedViteOptions.pluginOptions;
|
|
263
270
|
const platform = options.platform ?? process.platform;
|
|
@@ -317,9 +324,16 @@ var runMuonDevOnce = async (options, cwd) => {
|
|
|
317
324
|
*/
|
|
318
325
|
var runMuonDev = async (options = {}) => {
|
|
319
326
|
const cwd = (0, node_path.resolve)(options.root ?? process.cwd());
|
|
327
|
+
const warning = options.warning;
|
|
328
|
+
let viteServerProxyWarningReported = false;
|
|
329
|
+
const reportViteServerProxyWarning = () => {
|
|
330
|
+
if (viteServerProxyWarningReported) return;
|
|
331
|
+
warning?.("Vite server proxy configuration is only available during Vite development and is not used by muon run.");
|
|
332
|
+
viteServerProxyWarningReported = true;
|
|
333
|
+
};
|
|
320
334
|
let result;
|
|
321
335
|
do
|
|
322
|
-
result = await runMuonDevOnce(options, cwd);
|
|
336
|
+
result = await runMuonDevOnce(options, cwd, reportViteServerProxyWarning);
|
|
323
337
|
while (result.exitCode === muonRecycleExitCode);
|
|
324
338
|
return result;
|
|
325
339
|
};
|
|
@@ -1093,8 +1107,8 @@ var packMuonApp = async (options) => {
|
|
|
1093
1107
|
};
|
|
1094
1108
|
//#endregion
|
|
1095
1109
|
//#region src/generated/packageMetadata.ts
|
|
1096
|
-
var version = "0.
|
|
1097
|
-
var git_commit_hash = "
|
|
1110
|
+
var version = "0.18.0";
|
|
1111
|
+
var git_commit_hash = "cf5b421289da62d14ebb01f7b15acc02ac6d7750";
|
|
1098
1112
|
//#endregion
|
|
1099
1113
|
//#region src/cli.ts
|
|
1100
1114
|
var readTargetValues = (value) => {
|
|
@@ -1256,6 +1270,9 @@ var runDevCommand = async (commandOptions, command) => {
|
|
|
1256
1270
|
environment: process.env,
|
|
1257
1271
|
quietPrepare: commandOptions.json === true
|
|
1258
1272
|
};
|
|
1273
|
+
devOptions.warning = (message) => {
|
|
1274
|
+
console.warn(`Warning: ${message}`);
|
|
1275
|
+
};
|
|
1259
1276
|
if (commandOptions.muonPath !== void 0) devOptions.muonPath = commandOptions.muonPath;
|
|
1260
1277
|
if (commandOptions.cefPath !== void 0) devOptions.cefPath = commandOptions.cefPath;
|
|
1261
1278
|
if (commandOptions.stageDir !== void 0) devOptions.stagePath = commandOptions.stageDir;
|