@pipelab/plugin-electron 1.0.0-beta.1 → 1.0.0-beta.4
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/index.cjs +14 -2
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -7
- package/CHANGELOG.md +0 -20
- package/src/configure.ts +0 -23
- package/src/declarations.d.ts +0 -1
- package/src/fixtures/build/index.html +0 -11
- package/src/forge.ts +0 -851
- package/src/index.ts +0 -94
- package/src/make.spec.ts +0 -57
- package/src/make.ts +0 -22
- package/src/package-v2.ts +0 -52
- package/src/package.ts +0 -22
- package/src/preview.ts +0 -35
- package/src/public/electron.webp +0 -0
- package/src/utils.ts +0 -35
- package/tests/e2e/electron.spec.ts +0 -64
- package/tests/e2e/fixtures/folder-to-electron.json +0 -171
- package/tests/e2e/fixtures/folder-to-tauri.json +0 -58
- package/tests/e2e/vitest.config.mts +0 -20
- package/tsconfig.json +0 -10
- package/tsdown.config.ts +0 -15
package/dist/index.cjs
CHANGED
|
@@ -26,8 +26,7 @@ let _pipelab_constants = require("@pipelab/constants");
|
|
|
26
26
|
let node_path = require("node:path");
|
|
27
27
|
let node_fs_promises = require("node:fs/promises");
|
|
28
28
|
let node_os = require("node:os");
|
|
29
|
-
let
|
|
30
|
-
esbuild = __toESM(esbuild);
|
|
29
|
+
let node_url = require("node:url");
|
|
31
30
|
let ts_deepmerge = require("ts-deepmerge");
|
|
32
31
|
//#region ../../node_modules/change-case/dist/index.js
|
|
33
32
|
const SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
@@ -1955,6 +1954,19 @@ const forge = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
|
|
|
1955
1954
|
if (completeConfiguration.customMainCode) await (0, node_fs_promises.cp)(completeConfiguration.customMainCode, destinationFile, { recursive: true });
|
|
1956
1955
|
else await (0, node_fs_promises.writeFile)(destinationFile, "console.log(\"No custom main code provided\")", { signal: abortSignal });
|
|
1957
1956
|
if (isCJSOnly) {
|
|
1957
|
+
log(`Installing native esbuild for transpilation...`);
|
|
1958
|
+
const { all: esbuildAll } = await (0, _pipelab_plugin_core.runPnpm)(destinationFolder, {
|
|
1959
|
+
args: [
|
|
1960
|
+
"install",
|
|
1961
|
+
"-D",
|
|
1962
|
+
"esbuild@0.24.0",
|
|
1963
|
+
"--prefer-offline"
|
|
1964
|
+
],
|
|
1965
|
+
signal: abortSignal,
|
|
1966
|
+
context
|
|
1967
|
+
});
|
|
1968
|
+
if (esbuildAll) log(esbuildAll);
|
|
1969
|
+
const esbuild = await import((0, node_url.pathToFileURL)((0, node_path.join)(destinationFolder, "node_modules", "esbuild", "lib", "main.js")).href);
|
|
1958
1970
|
const external = [
|
|
1959
1971
|
"electron",
|
|
1960
1972
|
"@pipelab/steamworks.js",
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { getBinName, outFolderName } from "@pipelab/constants";
|
|
|
3
3
|
import { basename, delimiter, dirname, join } from "node:path";
|
|
4
4
|
import { cp, readFile, rm, writeFile } from "node:fs/promises";
|
|
5
5
|
import { arch, platform } from "node:os";
|
|
6
|
-
import
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
7
|
import { merge } from "ts-deepmerge";
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
9
|
var __create = Object.create;
|
|
@@ -1954,6 +1954,19 @@ const forge = async (action, appFolder, { cwd, log, inputs, setOutput, paths, ab
|
|
|
1954
1954
|
if (completeConfiguration.customMainCode) await cp(completeConfiguration.customMainCode, destinationFile, { recursive: true });
|
|
1955
1955
|
else await writeFile(destinationFile, "console.log(\"No custom main code provided\")", { signal: abortSignal });
|
|
1956
1956
|
if (isCJSOnly) {
|
|
1957
|
+
log(`Installing native esbuild for transpilation...`);
|
|
1958
|
+
const { all: esbuildAll } = await runPnpm(destinationFolder, {
|
|
1959
|
+
args: [
|
|
1960
|
+
"install",
|
|
1961
|
+
"-D",
|
|
1962
|
+
"esbuild@0.24.0",
|
|
1963
|
+
"--prefer-offline"
|
|
1964
|
+
],
|
|
1965
|
+
signal: abortSignal,
|
|
1966
|
+
context
|
|
1967
|
+
});
|
|
1968
|
+
if (esbuildAll) log(esbuildAll);
|
|
1969
|
+
const esbuild = await import(pathToFileURL(join(destinationFolder, "node_modules", "esbuild", "lib", "main.js")).href);
|
|
1957
1970
|
const external = [
|
|
1958
1971
|
"electron",
|
|
1959
1972
|
"@pipelab/steamworks.js",
|