@upsoft/electroy-app-runtime-bundles-package-dev-tools 2.0.0-alpha.3 → 2.0.0-alpha.30
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/build-electroy-app-runtime-bundle.js +5 -1
- package/build-electroy-app-runtime-bundles-package-main.js +2 -1
- package/gen-electroy-app-runtime-bundles-package-index-script-file.js +3 -0
- package/get-electroy-app-runtime-bundle-dir-path.js +6 -1
- package/get-electroy-app-runtime-bundle-webpack-config.js +3 -0
- package/package.json +2 -2
|
@@ -3,8 +3,11 @@ const $spawnasync = require('@expo/spawn-async');
|
|
|
3
3
|
exports.buildElectroyAppRuntimeBundle = async (
|
|
4
4
|
electroyAppRuntimeBundlesPackageDirPath,
|
|
5
5
|
electroyAppTargetOperatingSystemPlatform,
|
|
6
|
+
electroyAppTargetArch,
|
|
6
7
|
) => {
|
|
7
8
|
|
|
9
|
+
const targetArch = electroyAppTargetArch || `x64`;
|
|
10
|
+
|
|
8
11
|
let npmConfigPlatform;
|
|
9
12
|
|
|
10
13
|
if (electroyAppTargetOperatingSystemPlatform === `windows`) {
|
|
@@ -41,8 +44,9 @@ exports.buildElectroyAppRuntimeBundle = async (
|
|
|
41
44
|
env: {
|
|
42
45
|
...process.env,
|
|
43
46
|
PREBUILDS_ONLY: `true`,
|
|
44
|
-
npm_config_arch:
|
|
47
|
+
npm_config_arch: targetArch,
|
|
45
48
|
npm_config_platform: npmConfigPlatform,
|
|
49
|
+
ELECTROY_APP_TARGET_ARCH: targetArch,
|
|
46
50
|
},
|
|
47
51
|
},
|
|
48
52
|
);
|
|
@@ -11,7 +11,8 @@ const { genElectroyAppRuntimeBundlesPackageIndexScriptFile } = require('./gen-el
|
|
|
11
11
|
|
|
12
12
|
await Promise.all([
|
|
13
13
|
buildElectroyAppRuntimeBundle(electroyAppRuntimeBundlesPackageDirPath, `windows`),
|
|
14
|
-
buildElectroyAppRuntimeBundle(electroyAppRuntimeBundlesPackageDirPath, `macos`),
|
|
14
|
+
buildElectroyAppRuntimeBundle(electroyAppRuntimeBundlesPackageDirPath, `macos`, `x64`),
|
|
15
|
+
buildElectroyAppRuntimeBundle(electroyAppRuntimeBundlesPackageDirPath, `macos`, `arm64`),
|
|
15
16
|
buildElectroyAppRuntimeBundle(electroyAppRuntimeBundlesPackageDirPath, `linux`),
|
|
16
17
|
]);
|
|
17
18
|
|
|
@@ -23,6 +23,9 @@ exports.genElectroyAppRuntimeBundlesPackageIndexScriptFile = (
|
|
|
23
23
|
electroyAppRuntimeBundlesPackageIndexScript += `exports.RUNTIME_MACOS_BUNDLE_DIR_PATH = { value: require("path").resolve(__dirname, "../dist/runtime-macos-bundle") };\n`;
|
|
24
24
|
electroyAppRuntimeBundlesPackageIndexScriptTypes += `export declare const RUNTIME_MACOS_BUNDLE_DIR_PATH: { value: string; };\n`;
|
|
25
25
|
|
|
26
|
+
electroyAppRuntimeBundlesPackageIndexScript += `exports.RUNTIME_MACOS_ARM64_BUNDLE_DIR_PATH = { value: require("path").resolve(__dirname, "../dist/runtime-macos-arm64-bundle") };\n`;
|
|
27
|
+
electroyAppRuntimeBundlesPackageIndexScriptTypes += `export declare const RUNTIME_MACOS_ARM64_BUNDLE_DIR_PATH: { value: string; };\n`;
|
|
28
|
+
|
|
26
29
|
electroyAppRuntimeBundlesPackageIndexScript += `exports.RUNTIME_LINUX_BUNDLE_DIR_PATH = { value: require("path").resolve(__dirname, "../dist/runtime-linux-bundle") };\n`;
|
|
27
30
|
electroyAppRuntimeBundlesPackageIndexScriptTypes += `export declare const RUNTIME_LINUX_BUNDLE_DIR_PATH: { value: string; };\n`;
|
|
28
31
|
|
|
@@ -3,11 +3,16 @@ const $path = require(`path`);
|
|
|
3
3
|
exports.getElectroyAppRuntimeBundleDirPath = (
|
|
4
4
|
electroyAppRuntimeBundlesPackageDirPath,
|
|
5
5
|
electroyAppTargetOperatingSystemPlatform,
|
|
6
|
+
electroyAppTargetArch,
|
|
6
7
|
) => {
|
|
7
8
|
|
|
9
|
+
const archSuffix = electroyAppTargetArch && electroyAppTargetArch !== `x64`
|
|
10
|
+
? `-${electroyAppTargetArch}`
|
|
11
|
+
: ``;
|
|
12
|
+
|
|
8
13
|
return $path.resolve(
|
|
9
14
|
electroyAppRuntimeBundlesPackageDirPath,
|
|
10
15
|
`dist`,
|
|
11
|
-
`runtime-${electroyAppTargetOperatingSystemPlatform}-bundle`,
|
|
16
|
+
`runtime-${electroyAppTargetOperatingSystemPlatform}${archSuffix}-bundle`,
|
|
12
17
|
)
|
|
13
18
|
};
|
|
@@ -19,9 +19,12 @@ exports.getElectroyAppRuntimeBundleWebpackConfig = (
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const electroyAppTargetArch = process.env.ELECTROY_APP_TARGET_ARCH || `x64`;
|
|
23
|
+
|
|
22
24
|
const electroyAppRuntimeBundleDirPath = getElectroyAppRuntimeBundleDirPath(
|
|
23
25
|
electroyAppRuntimeBundlesPackageDirPath,
|
|
24
26
|
electroyAppTargetOperatingSystemPlatform,
|
|
27
|
+
electroyAppTargetArch,
|
|
25
28
|
);
|
|
26
29
|
|
|
27
30
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upsoft/electroy-app-runtime-bundles-package-dev-tools",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.30",
|
|
4
4
|
"files": [
|
|
5
5
|
"README.md",
|
|
6
6
|
"build-electroy-app-runtime-bundle.js",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"@witcher112/webpack-asset-relocator-loader": "1.8.0-alpha.3",
|
|
22
22
|
"webpack": "5.95.0",
|
|
23
23
|
"webpack-cli": "5.1.4",
|
|
24
|
-
"@upsoft/troy-ts-standard-package-dev-tools": "2.0.0-alpha.
|
|
24
|
+
"@upsoft/troy-ts-standard-package-dev-tools": "2.0.0-alpha.30"
|
|
25
25
|
}
|
|
26
26
|
}
|