muon-ui 0.21.0 → 0.23.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.
Files changed (55) hide show
  1. package/dist/cli.cjs +14 -11
  2. package/dist/cli.cjs.map +1 -1
  3. package/dist/index.cjs +2 -2
  4. package/dist/index.mjs +2 -2
  5. package/dist/native/linux-amd64/muon-builder +0 -0
  6. package/dist/native/linux-amd64/muon-launcher +0 -0
  7. package/dist/native/linux-amd64/muon-plugin-inspector +0 -0
  8. package/dist/native/linux-amd64/muon-runtime-helper +0 -0
  9. package/dist/native/linux-arm64/muon-builder +0 -0
  10. package/dist/native/linux-arm64/muon-launcher +0 -0
  11. package/dist/native/linux-arm64/muon-plugin-inspector +0 -0
  12. package/dist/native/linux-arm64/muon-runtime-helper +0 -0
  13. package/dist/native/linux-armhf/muon-builder +0 -0
  14. package/dist/native/linux-armhf/muon-launcher +0 -0
  15. package/dist/native/linux-armhf/muon-plugin-inspector +0 -0
  16. package/dist/native/linux-armhf/muon-runtime-helper +0 -0
  17. package/dist/native/windows-amd64/muon-builder.exe +0 -0
  18. package/dist/native/windows-amd64/muon-launcher.exe +0 -0
  19. package/dist/native/windows-amd64/muon-plugin-inspector.exe +0 -0
  20. package/dist/native/windows-i686/muon-builder.exe +0 -0
  21. package/dist/native/windows-i686/muon-launcher.exe +0 -0
  22. package/dist/native/windows-i686/muon-plugin-inspector.exe +0 -0
  23. package/dist/runtime/linux-amd64/muon-core +0 -0
  24. package/dist/runtime/linux-amd64/muon-executor-supervisor +0 -0
  25. package/dist/runtime/linux-amd64/plugins/node-bridge.mjs +107 -6
  26. package/dist/runtime/linux-amd64/plugins/node.so +0 -0
  27. package/dist/runtime/linux-arm64/muon-core +0 -0
  28. package/dist/runtime/linux-arm64/muon-executor-supervisor +0 -0
  29. package/dist/runtime/linux-arm64/plugins/node-bridge.mjs +107 -6
  30. package/dist/runtime/linux-arm64/plugins/node.so +0 -0
  31. package/dist/runtime/linux-armhf/muon-core +0 -0
  32. package/dist/runtime/linux-armhf/muon-executor-supervisor +0 -0
  33. package/dist/runtime/linux-armhf/plugins/node-bridge.mjs +107 -6
  34. package/dist/runtime/linux-armhf/plugins/node.so +0 -0
  35. package/dist/runtime/windows-amd64/libcardio.dll +0 -0
  36. package/dist/runtime/windows-amd64/libmuon-ui.dll +0 -0
  37. package/dist/runtime/windows-amd64/muon-core.exe +0 -0
  38. package/dist/runtime/windows-amd64/plugins/node-bridge.mjs +107 -6
  39. package/dist/runtime/windows-amd64/plugins/node.dll +0 -0
  40. package/dist/runtime/windows-i686/libcardio.dll +0 -0
  41. package/dist/runtime/windows-i686/libmuon-ui.dll +0 -0
  42. package/dist/runtime/windows-i686/muon-core.exe +0 -0
  43. package/dist/runtime/windows-i686/plugins/node-bridge.mjs +107 -6
  44. package/dist/runtime/windows-i686/plugins/node.dll +0 -0
  45. package/dist/{vite-internals-0JA6tPL0.cjs → vite-internals-Dk85Y_D_.cjs} +930 -16
  46. package/dist/vite-internals-Dk85Y_D_.cjs.map +1 -0
  47. package/dist/vite.cjs +42 -26
  48. package/dist/vite.cjs.map +1 -1
  49. package/dist/vite.mjs +983 -39
  50. package/dist/vite.mjs.map +1 -1
  51. package/muon-virtual-modules.d.ts +9 -0
  52. package/muon.d.ts +82 -22
  53. package/package.json +9 -7
  54. package/vite.d.ts +9 -6
  55. package/dist/vite-internals-0JA6tPL0.cjs.map +0 -1
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.21.0
4
+ * version: 0.23.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: 2f3b7522d64ed4fad1398ccd66b8090fd40f5b09
9
+ * git.commit.hash: d43e63afd68a412a86be0cd61fceeb04cbd82270
10
10
  */
11
- const require_vite_internals = require("./vite-internals-0JA6tPL0.cjs");
11
+ const require_vite_internals = require("./vite-internals-Dk85Y_D_.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");
@@ -227,7 +227,7 @@ var resolveAssetSource = async (root, assetSourcePath, projectConfig) => {
227
227
  overrideAssetSourcePath: defaultAssetSourcePath
228
228
  };
229
229
  };
230
- var createMuonDevOverrideConfig = (assetSourcePath, enableDebugger, browserStartPage, runtimePluginConfig, nodeProjectPath) => {
230
+ var createMuonDevOverrideConfig = (assetSourcePath, enableDebugger, allowInsecureLocalhost, browserStartPage, runtimePluginConfig, nodeProjectPath) => {
231
231
  const browser = browserStartPage === void 0 && !enableDebugger ? void 0 : {
232
232
  ...browserStartPage === void 0 ? {} : { startPage: browserStartPage },
233
233
  ...enableDebugger ? { keybind: {
@@ -240,6 +240,7 @@ var createMuonDevOverrideConfig = (assetSourcePath, enableDebugger, browserStart
240
240
  ...nodeProjectPath === void 0 ? {} : { node: { project: nodeProjectPath } },
241
241
  ...enableDebugger ? { cdp: { enable: true } } : {},
242
242
  ...browser === void 0 ? {} : { browser },
243
+ ...allowInsecureLocalhost === void 0 ? {} : { network: { localAccess: { allowInsecureLocalhost } } },
243
244
  ...runtimePluginConfig === void 0 ? {} : { plugin: runtimePluginConfig }
244
245
  };
245
246
  };
@@ -247,8 +248,8 @@ var writeMuonDevOverrideConfig = async (overrideConfigPath, overrideConfig) => {
247
248
  await (0, node_fs_promises.mkdir)((0, node_path.dirname)(overrideConfigPath), { recursive: true });
248
249
  await (0, node_fs_promises.writeFile)(overrideConfigPath, `${JSON.stringify(overrideConfig, null, 2)}\n`);
249
250
  };
250
- var runMuonExecutable = async (muonExecutablePath, configPaths, allowInsecureLocalhost, environment) => {
251
- const child = (0, node_child_process.spawn)(muonExecutablePath, [...configPaths.flatMap((configPath) => ["-c", configPath]), ...allowInsecureLocalhost ? ["--allow-insecure-localhost"] : []], {
251
+ var runMuonExecutable = async (muonExecutablePath, configPaths, environment) => {
252
+ const child = (0, node_child_process.spawn)(muonExecutablePath, configPaths.flatMap((configPath) => ["-c", configPath]), {
252
253
  cwd: (0, node_path.dirname)(muonExecutablePath),
253
254
  env: environment,
254
255
  stdio: [
@@ -286,7 +287,7 @@ var runMuonDevOnce = async (options, cwd, reportViteServerProxyWarning) => {
286
287
  const cefPath = options.cefPath !== void 0 ? resolveFromRoot(root, options.cefPath) : pluginOptions?.cefPath === void 0 ? void 0 : resolveFromRoot(root, pluginOptions.cefPath);
287
288
  const stagePath = options.stagePath !== void 0 ? resolveFromRoot(root, options.stagePath) : pluginOptions?.stagePath === void 0 ? (0, node_path.resolve)(root, ".muon", target) : resolveFromRoot(root, pluginOptions.stagePath);
288
289
  const enableDebugger = options.enableDebugger ?? pluginOptions?.enableDebugger ?? true;
289
- const allowInsecureLocalhost = options.allowInsecureLocalhost ?? pluginOptions?.allowInsecureLocalhost ?? false;
290
+ const allowInsecureLocalhost = options.allowInsecureLocalhost ?? pluginOptions?.allowInsecureLocalhost;
290
291
  const projectConfig = await resolveProjectConfig(root, options.configPath ?? preparedViteAssets?.configPath);
291
292
  const nodeProject = await require_vite_internals.resolveMuonNodeProject(projectConfig.config, projectConfig.configPath === void 0 ? root : (0, node_path.dirname)(projectConfig.configPath));
292
293
  const asset = preparedViteAssets === void 0 ? await resolveAssetSource(root, options.assetSourcePath, projectConfig) : {
@@ -304,6 +305,7 @@ var runMuonDevOnce = async (options, cwd, reportViteServerProxyWarning) => {
304
305
  stageDir: stagePath,
305
306
  target,
306
307
  cacheDir: environment.MUON_CACHE_DIR,
308
+ nodeRuntimeRequirement: require_vite_internals.createMuonNodeRuntimeRequirement(nodeProject, true),
307
309
  force: false,
308
310
  quiet: options.quietPrepare === true,
309
311
  prepareExecutablePath: void 0,
@@ -313,9 +315,9 @@ var runMuonDevOnce = async (options, cwd, reportViteServerProxyWarning) => {
313
315
  if (preparedRuntime.stagePath === void 0) throw new Error("muon-builder did not return a staged runtime path.");
314
316
  const nodeProjectPath = await require_vite_internals.stageMuonNodeProject(nodeProject, preparedRuntime.stagePath);
315
317
  if (nodeProjectPath !== void 0) await require_vite_internals.assertMuonNodeHostArtifacts(preparedRuntime.stagePath, platform);
316
- await writeMuonDevOverrideConfig(overrideConfigPath, createMuonDevOverrideConfig(asset.overrideAssetSourcePath, enableDebugger, browserStartPage, preparedViteAssets?.runtimePluginConfig, nodeProjectPath));
318
+ await writeMuonDevOverrideConfig(overrideConfigPath, createMuonDevOverrideConfig(asset.overrideAssetSourcePath, enableDebugger, allowInsecureLocalhost, browserStartPage, preparedViteAssets?.runtimePluginConfig, nodeProjectPath));
317
319
  const muonExecutablePath = require_vite_internals.getMuonExecutablePath(preparedRuntime.stagePath, platform);
318
- const exitCode = await runMuonExecutable(muonExecutablePath, [...projectConfig.configPath === void 0 ? [] : [projectConfig.configPath], overrideConfigPath], allowInsecureLocalhost, environment);
320
+ const exitCode = await runMuonExecutable(muonExecutablePath, [...projectConfig.configPath === void 0 ? [] : [projectConfig.configPath], overrideConfigPath], environment);
319
321
  return {
320
322
  root,
321
323
  target,
@@ -1124,8 +1126,8 @@ var packMuonApp = async (options) => {
1124
1126
  };
1125
1127
  //#endregion
1126
1128
  //#region src/generated/packageMetadata.ts
1127
- var version = "0.21.0";
1128
- var git_commit_hash = "2f3b7522d64ed4fad1398ccd66b8090fd40f5b09";
1129
+ var version = "0.23.0";
1130
+ var git_commit_hash = "d43e63afd68a412a86be0cd61fceeb04cbd82270";
1129
1131
  //#endregion
1130
1132
  //#region src/cli.ts
1131
1133
  var readTargetValues = (value) => {
@@ -1272,6 +1274,7 @@ var runPrepareCommand = async (commandOptions) => {
1272
1274
  stageDir: commandOptions.stageDir,
1273
1275
  target: commandOptions.target ?? require_vite_internals.getDefaultMuonPrepareTarget(process.platform, process.arch),
1274
1276
  cacheDir: commandOptions.cacheDir,
1277
+ nodeRuntimeRequirement: void 0,
1275
1278
  force: commandOptions.force === true,
1276
1279
  quiet: commandOptions.quiet === true,
1277
1280
  prepareExecutablePath: void 0,