emsdk-env 0.4.0 → 0.6.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/{build-oSzNI6Av.js → build-B0LjpT0A.js} +8 -7
- package/dist/{build-oSzNI6Av.js.map → build-B0LjpT0A.js.map} +1 -1
- package/dist/{build-DwIdyC2W.cjs → build-C7VNCGou.cjs} +30 -7
- package/dist/{build-DwIdyC2W.cjs.map → build-C7VNCGou.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +20 -2
- package/dist/index.mjs +3 -3
- package/dist/vite.cjs +18 -20
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.ts +2 -2
- package/dist/vite.mjs +18 -20
- package/dist/vite.mjs.map +1 -1
- package/package.json +7 -7
- package/dist/__vite-browser-external-2Ng8QIWW.js +0 -15
- package/dist/__vite-browser-external-2Ng8QIWW.js.map +0 -1
- package/dist/__vite-browser-external-DES75WN9.cjs +0 -15
- package/dist/__vite-browser-external-DES75WN9.cjs.map +0 -1
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: emsdk-env
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.6.0
|
|
4
4
|
* description: Emscripten environment builder
|
|
5
5
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
6
6
|
* license: MIT
|
|
7
7
|
* repository.url: https://github.com/kekyo/emsdk-env
|
|
8
|
-
* git.commit.hash:
|
|
8
|
+
* git.commit.hash: b3d95605029bb48999dacbfe7f264f960144b13d
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
"use strict";
|
|
12
|
+
var __create = Object.create;
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
+
mod
|
|
33
|
+
));
|
|
12
34
|
const promises = require("fs/promises");
|
|
13
35
|
const os = require("os");
|
|
14
36
|
const glob = require("glob");
|
|
@@ -737,7 +759,7 @@ const resolveImportDirectories = async (rootDir, imports) => {
|
|
|
737
759
|
if (imports.length === 0) {
|
|
738
760
|
return { includeDirs: [], libDirs: [] };
|
|
739
761
|
}
|
|
740
|
-
const moduleApi = await
|
|
762
|
+
const moduleApi = await import("node:module");
|
|
741
763
|
const resolver = moduleApi.createRequire(path.resolve(rootDir, "package.json"));
|
|
742
764
|
const includeDirs = [];
|
|
743
765
|
const libDirs = [];
|
|
@@ -1030,9 +1052,6 @@ const buildWasm = async (options) => {
|
|
|
1030
1052
|
groupIndex: void 0
|
|
1031
1053
|
});
|
|
1032
1054
|
}
|
|
1033
|
-
logger.info(
|
|
1034
|
-
parallel ? `Building target: '${targetName}' [${compileJobs.length} files, in parallel]` : `Building target: '${targetName}' [${compileJobs.length} files]`
|
|
1035
|
-
);
|
|
1036
1055
|
for (let index = 0; index < groupSources.length; index += 1) {
|
|
1037
1056
|
const sourcesInGroup = groupSources[index];
|
|
1038
1057
|
if (!sourcesInGroup) {
|
|
@@ -1046,6 +1065,9 @@ const buildWasm = async (options) => {
|
|
|
1046
1065
|
compileJobs.push({ source, args: groupArgs, groupIndex: index });
|
|
1047
1066
|
}
|
|
1048
1067
|
}
|
|
1068
|
+
logger.info(
|
|
1069
|
+
parallel ? `Building target: '${targetName}' [${compileJobs.length} files, in parallel]` : `Building target: '${targetName}' [${compileJobs.length} files]`
|
|
1070
|
+
);
|
|
1049
1071
|
const objectFiles = parallel ? await Promise.all(
|
|
1050
1072
|
compileJobs.map(
|
|
1051
1073
|
(job) => compileSource(job.source, job.args, job.groupIndex)
|
|
@@ -1101,5 +1123,6 @@ const buildWasm = async (options) => {
|
|
|
1101
1123
|
};
|
|
1102
1124
|
};
|
|
1103
1125
|
exports.buildWasm = buildWasm;
|
|
1126
|
+
exports.createConsoleLogger = createConsoleLogger;
|
|
1104
1127
|
exports.prepareEmsdk = prepareEmsdk;
|
|
1105
|
-
//# sourceMappingURL=build-
|
|
1128
|
+
//# sourceMappingURL=build-C7VNCGou.cjs.map
|