muon-ui 0.22.0 → 0.24.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 (43) hide show
  1. package/dist/cli.cjs +12 -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-runtime-helper +0 -0
  8. package/dist/native/linux-arm64/muon-builder +0 -0
  9. package/dist/native/linux-arm64/muon-launcher +0 -0
  10. package/dist/native/linux-arm64/muon-runtime-helper +0 -0
  11. package/dist/native/linux-armhf/muon-builder +0 -0
  12. package/dist/native/linux-armhf/muon-launcher +0 -0
  13. package/dist/native/linux-armhf/muon-runtime-helper +0 -0
  14. package/dist/native/windows-amd64/muon-builder.exe +0 -0
  15. package/dist/native/windows-amd64/muon-launcher.exe +0 -0
  16. package/dist/native/windows-amd64/muon-plugin-inspector.exe +0 -0
  17. package/dist/native/windows-i686/muon-builder.exe +0 -0
  18. package/dist/native/windows-i686/muon-launcher.exe +0 -0
  19. package/dist/native/windows-i686/muon-plugin-inspector.exe +0 -0
  20. package/dist/runtime/linux-amd64/muon-core +0 -0
  21. package/dist/runtime/linux-amd64/plugins/node-bridge.mjs +2 -2
  22. package/dist/runtime/linux-arm64/muon-core +0 -0
  23. package/dist/runtime/linux-arm64/plugins/node-bridge.mjs +2 -2
  24. package/dist/runtime/linux-armhf/muon-core +0 -0
  25. package/dist/runtime/linux-armhf/plugins/node-bridge.mjs +2 -2
  26. package/dist/runtime/windows-amd64/libcardio.dll +0 -0
  27. package/dist/runtime/windows-amd64/libmuon-ui.dll +0 -0
  28. package/dist/runtime/windows-amd64/muon-core.exe +0 -0
  29. package/dist/runtime/windows-amd64/plugins/node-bridge.mjs +2 -2
  30. package/dist/runtime/windows-amd64/plugins/node.dll +0 -0
  31. package/dist/runtime/windows-i686/libcardio.dll +0 -0
  32. package/dist/runtime/windows-i686/libmuon-ui.dll +0 -0
  33. package/dist/runtime/windows-i686/muon-core.exe +0 -0
  34. package/dist/runtime/windows-i686/plugins/node-bridge.mjs +2 -2
  35. package/dist/runtime/windows-i686/plugins/node.dll +0 -0
  36. package/dist/{vite-internals-BA4riWRd.cjs → vite-internals-BIthRkfD.cjs} +12 -9
  37. package/dist/{vite-internals-BA4riWRd.cjs.map → vite-internals-BIthRkfD.cjs.map} +1 -1
  38. package/dist/vite.cjs +3 -3
  39. package/dist/vite.cjs.map +1 -1
  40. package/dist/vite.mjs +11 -8
  41. package/dist/vite.mjs.map +1 -1
  42. package/package.json +8 -8
  43. package/vite.d.ts +9 -6
package/dist/vite.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * name: muon-ui
3
- * version: 0.22.0
3
+ * version: 0.24.0
4
4
  * description: A multi-platform GUI application framework that uses CEF as its backend
5
5
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
6
6
  * license: MIT
7
7
  * repository.url: https://github.com/kekyo/muon-ui.git
8
- * git.commit.hash: 5c8d38ea864ba1916f26e6beb6814a4af57479d7
8
+ * git.commit.hash: ac4a9d38761a0d25b9995800434e3ea33e12b74c
9
9
  */
10
10
  import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
11
11
  import { constants, existsSync, readFileSync, writeFileSync } from "node:fs";
@@ -6054,7 +6054,7 @@ var getWebSocketOrigin = (startUrl) => {
6054
6054
  else if (url.protocol === "http:") url.protocol = "ws:";
6055
6055
  return url.origin;
6056
6056
  };
6057
- var createMuonOverrideConfig = (startUrl, enableDebugger, config, runtimePluginConfig, nodeProjectPath) => {
6057
+ var createMuonOverrideConfig = (startUrl, enableDebugger, allowInsecureLocalhost, config, runtimePluginConfig, nodeProjectPath) => {
6058
6058
  const origin = new URL(startUrl).origin;
6059
6059
  return {
6060
6060
  ...config === void 0 ? {} : { config: { ...config } },
@@ -6071,7 +6071,10 @@ var createMuonOverrideConfig = (startUrl, enableDebugger, config, runtimePluginC
6071
6071
  ...runtimePluginConfig,
6072
6072
  pages: [`${origin}/**`]
6073
6073
  },
6074
- network: { allow: [`${origin}/**`, `${getWebSocketOrigin(startUrl)}/**`] }
6074
+ network: {
6075
+ allow: [`${origin}/**`, `${getWebSocketOrigin(startUrl)}/**`],
6076
+ ...allowInsecureLocalhost === void 0 ? {} : { localAccess: { allowInsecureLocalhost } }
6077
+ }
6075
6078
  };
6076
6079
  };
6077
6080
  var writeMuonOverrideConfig = (server, overrideConfigPath, pluginOptions, runtimePluginConfig, nodeProjectPath) => {
@@ -6080,7 +6083,7 @@ var writeMuonOverrideConfig = (server, overrideConfigPath, pluginOptions, runtim
6080
6083
  server.config.logger.warn("muon Vite plugin could not resolve a Vite URL.");
6081
6084
  return false;
6082
6085
  }
6083
- writeFileSync(overrideConfigPath, `${JSON.stringify(createMuonOverrideConfig(startUrl, pluginOptions.enableDebugger !== false, pluginOptions.dev?.config, runtimePluginConfig, nodeProjectPath), null, 2)}\n`);
6086
+ writeFileSync(overrideConfigPath, `${JSON.stringify(createMuonOverrideConfig(startUrl, pluginOptions.enableDebugger !== false, pluginOptions.allowInsecureLocalhost, pluginOptions.dev?.config, runtimePluginConfig, nodeProjectPath), null, 2)}\n`);
6084
6087
  return true;
6085
6088
  };
6086
6089
  var createRuntimePaths = async () => {
@@ -6130,8 +6133,8 @@ var createMuonConfigArguments = (projectConfigPath, overrideConfigPath) => [
6130
6133
  "-c",
6131
6134
  overrideConfigPath
6132
6135
  ];
6133
- var waitForMuonProcess = async (muonExecutablePath, configArguments, allowInsecureLocalhost, environment, setCurrentChild) => {
6134
- const child = spawn(muonExecutablePath, [...configArguments, ...allowInsecureLocalhost ? ["--allow-insecure-localhost"] : []], {
6136
+ var waitForMuonProcess = async (muonExecutablePath, configArguments, environment, setCurrentChild) => {
6137
+ const child = spawn(muonExecutablePath, [...configArguments], {
6135
6138
  cwd: dirname(muonExecutablePath),
6136
6139
  env: environment,
6137
6140
  stdio: "ignore",
@@ -6199,7 +6202,7 @@ var startMuonViteBrowserBridge = async ({ server, pluginOptions, refreshRuntimeP
6199
6202
  const nodeProjectPath = await stageMuonNodeProject(nodeProject, preparedRuntime.stagePath);
6200
6203
  if (nodeProjectPath !== void 0) await assertMuonNodeHostArtifacts(preparedRuntime.stagePath, platform);
6201
6204
  if (!writeMuonOverrideConfig(server, paths.overrideConfigPath, pluginOptions, runtimePluginConfig, nodeProjectPath) || closing) return;
6202
- exitCode = await waitForMuonProcess(getMuonExecutablePath(preparedRuntime.stagePath, platform), createMuonConfigArguments(projectConfig.path, paths.overrideConfigPath), pluginOptions.allowInsecureLocalhost === true, environment, setCurrentChild);
6205
+ exitCode = await waitForMuonProcess(getMuonExecutablePath(preparedRuntime.stagePath, platform), createMuonConfigArguments(projectConfig.path, paths.overrideConfigPath), environment, setCurrentChild);
6203
6206
  if (!closing && exitCode !== muonRecycleExitCode) closeServerAfterMuonExit();
6204
6207
  } catch (error) {
6205
6208
  if (!closing) server.config.logger.warn(`muon startup failed: ${getErrorMessage$1(error)}`);