emsdk-env 0.3.0 → 0.4.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/README.md +21 -4
- package/dist/__vite-browser-external-2Ng8QIWW.js +15 -0
- package/dist/__vite-browser-external-2Ng8QIWW.js.map +1 -0
- package/dist/__vite-browser-external-DES75WN9.cjs +15 -0
- package/dist/__vite-browser-external-DES75WN9.cjs.map +1 -0
- package/dist/{build-DdEthYh8.cjs → build-DwIdyC2W.cjs} +266 -50
- package/dist/{build-DdEthYh8.cjs.map → build-DwIdyC2W.cjs.map} +1 -1
- package/dist/{build-CYHeaOdc.js → build-oSzNI6Av.js} +268 -52
- package/dist/{build-CYHeaOdc.js.map → build-oSzNI6Av.js.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +58 -31
- package/dist/index.mjs +3 -3
- package/dist/vite.cjs +32 -8
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.ts +71 -40
- package/dist/vite.mjs +32 -8
- package/dist/vite.mjs.map +1 -1
- package/package.json +7 -7
package/dist/vite.d.ts
CHANGED
|
@@ -1,15 +1,57 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: emsdk-env
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.4.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: cd0d8e53bf52b98940dd50343a9d3a39200306bd
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { Plugin } from 'vite';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Common options for building WASM binaries.
|
|
15
|
+
*/
|
|
16
|
+
declare interface BuildWasmCommonOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Emscripten SDK setup options (defaults to `targetVersion: 'latest'`).
|
|
19
|
+
*/
|
|
20
|
+
readonly emsdk?: PrepareEmsdkOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Package imports that provide include/lib directories.
|
|
23
|
+
*/
|
|
24
|
+
readonly imports?: readonly string[];
|
|
25
|
+
/**
|
|
26
|
+
* Source root directory (defaults to `wasm`).
|
|
27
|
+
*/
|
|
28
|
+
readonly srcDir?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Default include directory (defaults to `include`).
|
|
31
|
+
*/
|
|
32
|
+
readonly includeDir?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Output directory for generated WASM files (defaults to `src/wasm`).
|
|
35
|
+
*/
|
|
36
|
+
readonly outDir?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Output directory for generated archives (defaults to `lib`).
|
|
39
|
+
*/
|
|
40
|
+
readonly libDir?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Temporary build directory (defaults to OS temp dir).
|
|
43
|
+
*/
|
|
44
|
+
readonly buildDir?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Remove the build directory after completion. (defaults to true).
|
|
47
|
+
*/
|
|
48
|
+
readonly cleanupBuildDir?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Compile sources in parallel (defaults to true).
|
|
51
|
+
*/
|
|
52
|
+
readonly parallel?: boolean;
|
|
53
|
+
}
|
|
54
|
+
|
|
13
55
|
/**
|
|
14
56
|
* Value type for preprocessor defines.
|
|
15
57
|
*/
|
|
@@ -30,27 +72,7 @@ export default emsdkEnv;
|
|
|
30
72
|
/**
|
|
31
73
|
* Options for the emsdk-env Vite plugin.
|
|
32
74
|
*/
|
|
33
|
-
declare interface EmsdkVitePluginOptions extends WasmBuildRule {
|
|
34
|
-
/**
|
|
35
|
-
* Emscripten SDK setup options.
|
|
36
|
-
*/
|
|
37
|
-
emsdk?: PrepareEmsdkOptions;
|
|
38
|
-
/**
|
|
39
|
-
* Source root directory (defaults to `wasm`).
|
|
40
|
-
*/
|
|
41
|
-
srcDir?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Output directory for generated WASM files (defaults to `src/wasm`).
|
|
44
|
-
*/
|
|
45
|
-
outDir?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Temporary build directory (defaults to OS temp dir).
|
|
48
|
-
*/
|
|
49
|
-
buildDir?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Remove the build directory after completion.
|
|
52
|
-
*/
|
|
53
|
-
cleanupBuildDir?: boolean;
|
|
75
|
+
declare interface EmsdkVitePluginOptions extends BuildWasmCommonOptions, WasmBuildRule {
|
|
54
76
|
}
|
|
55
77
|
|
|
56
78
|
/**
|
|
@@ -58,19 +80,19 @@ declare interface EmsdkVitePluginOptions extends WasmBuildRule {
|
|
|
58
80
|
*/
|
|
59
81
|
declare interface PrepareEmsdkOptions {
|
|
60
82
|
/**
|
|
61
|
-
* Emscripten SDK version to install (e.g. "latest" or a specific tag).
|
|
83
|
+
* Emscripten SDK version to install (e.g. "latest" or a specific tag. defaults to 'latest').
|
|
62
84
|
*/
|
|
63
85
|
readonly targetVersion?: string;
|
|
64
86
|
/**
|
|
65
|
-
* Cache directory for the SDK.
|
|
87
|
+
* Cache directory for the Emscripten SDK (defaults to `~/.cache/emsdk-env`).
|
|
66
88
|
*/
|
|
67
89
|
readonly cacheDir?: string;
|
|
68
90
|
/**
|
|
69
|
-
* Custom
|
|
91
|
+
* Custom Emscripten SDK repository URL (defaults to the official Emscripten SDK GitHub repository).
|
|
70
92
|
*/
|
|
71
93
|
readonly repoUrl?: string;
|
|
72
94
|
/**
|
|
73
|
-
* Git executable path.
|
|
95
|
+
* Git executable path (defaults to `git`).
|
|
74
96
|
*/
|
|
75
97
|
readonly gitPath?: string;
|
|
76
98
|
/**
|
|
@@ -84,23 +106,23 @@ declare interface PrepareEmsdkOptions {
|
|
|
84
106
|
*/
|
|
85
107
|
declare interface WasmBuildCommonOptions {
|
|
86
108
|
/**
|
|
87
|
-
*
|
|
109
|
+
* Common compile options applied to this target.
|
|
88
110
|
*/
|
|
89
111
|
readonly options?: readonly string[];
|
|
90
112
|
/**
|
|
91
|
-
* Additional link options passed to `emcc` during the final link step.
|
|
113
|
+
* Additional common link options passed to `emcc` during the final link step.
|
|
92
114
|
*/
|
|
93
115
|
readonly linkOptions?: readonly string[];
|
|
94
116
|
/**
|
|
95
|
-
*
|
|
117
|
+
* Common symbols to export (mapped to `-s EXPORTED_FUNCTIONS=...`).
|
|
96
118
|
*/
|
|
97
119
|
readonly exports?: readonly string[];
|
|
98
120
|
/**
|
|
99
|
-
*
|
|
121
|
+
* Common include directories added as `-I` flags (defaults to `$includeDir`).
|
|
100
122
|
*/
|
|
101
123
|
readonly includeDirs?: readonly string[];
|
|
102
124
|
/**
|
|
103
|
-
*
|
|
125
|
+
* Common preprocessor defines applied as `-D` flags.
|
|
104
126
|
*/
|
|
105
127
|
readonly defines?: Record<string, DefineValue>;
|
|
106
128
|
}
|
|
@@ -128,15 +150,15 @@ declare interface WasmBuildSourceGroup {
|
|
|
128
150
|
*/
|
|
129
151
|
readonly sources: readonly string[];
|
|
130
152
|
/**
|
|
131
|
-
*
|
|
153
|
+
* Compile options applied to this target for this group.
|
|
132
154
|
*/
|
|
133
155
|
readonly options?: readonly string[];
|
|
134
156
|
/**
|
|
135
|
-
* Include directories for this group.
|
|
157
|
+
* Include directories added as `-I` flags for this group.
|
|
136
158
|
*/
|
|
137
159
|
readonly includeDirs?: readonly string[];
|
|
138
160
|
/**
|
|
139
|
-
* Preprocessor defines for this group.
|
|
161
|
+
* Preprocessor defines applied as `-D` flags for this group.
|
|
140
162
|
*/
|
|
141
163
|
readonly defines?: Record<string, DefineValue>;
|
|
142
164
|
}
|
|
@@ -146,7 +168,11 @@ declare interface WasmBuildSourceGroup {
|
|
|
146
168
|
*/
|
|
147
169
|
declare interface WasmBuildTarget {
|
|
148
170
|
/**
|
|
149
|
-
*
|
|
171
|
+
* Target output type (defaults to 'wasm').
|
|
172
|
+
*/
|
|
173
|
+
readonly type?: WasmBuildTargetType;
|
|
174
|
+
/**
|
|
175
|
+
* Output file path (relative to `outDir` or `libDir` unless absolute).
|
|
150
176
|
*/
|
|
151
177
|
readonly outFile?: string;
|
|
152
178
|
/**
|
|
@@ -162,21 +188,26 @@ declare interface WasmBuildTarget {
|
|
|
162
188
|
*/
|
|
163
189
|
readonly options?: readonly string[];
|
|
164
190
|
/**
|
|
165
|
-
*
|
|
191
|
+
* Additional link options passed to `emcc` during the final link step.
|
|
166
192
|
*/
|
|
167
193
|
readonly linkOptions?: readonly string[];
|
|
168
194
|
/**
|
|
169
|
-
*
|
|
195
|
+
* Common symbols to export (mapped to `-s EXPORTED_FUNCTIONS=...`).
|
|
170
196
|
*/
|
|
171
197
|
readonly exports?: readonly string[];
|
|
172
198
|
/**
|
|
173
|
-
* Include directories
|
|
199
|
+
* Include directories added as `-I` flags.
|
|
174
200
|
*/
|
|
175
201
|
readonly includeDirs?: readonly string[];
|
|
176
202
|
/**
|
|
177
|
-
* Preprocessor defines
|
|
203
|
+
* Preprocessor defines applied as `-D` flags.
|
|
178
204
|
*/
|
|
179
205
|
readonly defines?: Record<string, DefineValue>;
|
|
180
206
|
}
|
|
181
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Build target type for WASM or archive outputs.
|
|
210
|
+
*/
|
|
211
|
+
declare type WasmBuildTargetType = 'wasm' | 'archive';
|
|
212
|
+
|
|
182
213
|
export { }
|
package/dist/vite.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* name: emsdk-env
|
|
3
|
-
* version: 0.
|
|
3
|
+
* version: 0.4.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: cd0d8e53bf52b98940dd50343a9d3a39200306bd
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { isAbsolute, resolve, relative } from "path";
|
|
12
|
-
import { b as buildWasm } from "./build-
|
|
12
|
+
import { b as buildWasm } from "./build-oSzNI6Av.js";
|
|
13
13
|
function getDefaultExportFromCjs(x) {
|
|
14
14
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
15
15
|
}
|
|
@@ -521,6 +521,7 @@ const createViteLoggerAdapter = (viteLogger, logLevel, prefix) => {
|
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
523
|
const DEFAULT_WASM_SRC_DIR = "wasm";
|
|
524
|
+
const DEFAULT_WASM_INCLUDE_DIR = "include";
|
|
524
525
|
const buildRuns = /* @__PURE__ */ new Map();
|
|
525
526
|
const resolvePath = (rootDir, value) => isAbsolute(value) ? value : resolve(rootDir, value);
|
|
526
527
|
const expandPlaceholders = (value, env, label) => value.replace(/\{([A-Z0-9_]+)\}/g, (_match, key) => {
|
|
@@ -536,16 +537,31 @@ const resolveIncludeDirs = (includeDirs, env, rootDir) => {
|
|
|
536
537
|
return expanded.map((value) => resolvePath(rootDir, value));
|
|
537
538
|
};
|
|
538
539
|
const createBuildOptions = (options, resolvedConfig, logger) => {
|
|
539
|
-
const {
|
|
540
|
+
const {
|
|
541
|
+
emsdk,
|
|
542
|
+
srcDir,
|
|
543
|
+
includeDir,
|
|
544
|
+
imports,
|
|
545
|
+
outDir,
|
|
546
|
+
libDir,
|
|
547
|
+
buildDir,
|
|
548
|
+
cleanupBuildDir,
|
|
549
|
+
parallel,
|
|
550
|
+
...rule
|
|
551
|
+
} = options;
|
|
540
552
|
return {
|
|
541
553
|
rule,
|
|
542
554
|
root: resolvedConfig.root,
|
|
543
555
|
logger,
|
|
544
556
|
...emsdk !== void 0 ? { emsdk } : {},
|
|
545
557
|
...srcDir !== void 0 ? { srcDir } : {},
|
|
558
|
+
...includeDir !== void 0 ? { includeDir } : {},
|
|
559
|
+
...imports !== void 0 ? { imports } : {},
|
|
546
560
|
...outDir !== void 0 ? { outDir } : {},
|
|
561
|
+
...libDir !== void 0 ? { libDir } : {},
|
|
547
562
|
...buildDir !== void 0 ? { buildDir } : {},
|
|
548
|
-
...cleanupBuildDir !== void 0 ? { cleanupBuildDir } : {}
|
|
563
|
+
...cleanupBuildDir !== void 0 ? { cleanupBuildDir } : {},
|
|
564
|
+
...parallel !== void 0 ? { parallel } : {}
|
|
549
565
|
};
|
|
550
566
|
};
|
|
551
567
|
const isSubPath = (parentDir, targetPath) => {
|
|
@@ -556,7 +572,7 @@ const isSubPath = (parentDir, targetPath) => {
|
|
|
556
572
|
return !rel.startsWith("..") && !isAbsolute(rel);
|
|
557
573
|
};
|
|
558
574
|
const resolveWatchTargets = (options, resolvedConfig) => {
|
|
559
|
-
var _a, _b;
|
|
575
|
+
var _a, _b, _c;
|
|
560
576
|
const rootDir = resolvedConfig.root;
|
|
561
577
|
const baseEnv = {
|
|
562
578
|
ROOT: rootDir
|
|
@@ -566,10 +582,17 @@ const resolveWatchTargets = (options, resolvedConfig) => {
|
|
|
566
582
|
baseEnv,
|
|
567
583
|
"srcDir"
|
|
568
584
|
);
|
|
585
|
+
const rawIncludeDir = expandPlaceholders(
|
|
586
|
+
(_b = options.includeDir) != null ? _b : DEFAULT_WASM_INCLUDE_DIR,
|
|
587
|
+
baseEnv,
|
|
588
|
+
"includeDir"
|
|
589
|
+
);
|
|
569
590
|
const srcDir = resolvePath(rootDir, rawSrcDir);
|
|
591
|
+
const includeDir = resolvePath(rootDir, rawIncludeDir);
|
|
570
592
|
const envWithDirs = {
|
|
571
593
|
ROOT: rootDir,
|
|
572
|
-
SRC_DIR: srcDir
|
|
594
|
+
SRC_DIR: srcDir,
|
|
595
|
+
INCLUDE_DIR: includeDir
|
|
573
596
|
};
|
|
574
597
|
const patterns = /* @__PURE__ */ new Set();
|
|
575
598
|
const baseDirs = /* @__PURE__ */ new Set();
|
|
@@ -588,7 +611,8 @@ const resolveWatchTargets = (options, resolvedConfig) => {
|
|
|
588
611
|
resolvedIncludeDirs.push(dir);
|
|
589
612
|
}
|
|
590
613
|
};
|
|
591
|
-
|
|
614
|
+
const commonIncludeDirs = ((_c = options.common) == null ? void 0 : _c.includeDirs) === void 0 ? [rawIncludeDir] : options.common.includeDirs;
|
|
615
|
+
addIncludePatterns(commonIncludeDirs, void 0);
|
|
592
616
|
for (const [targetName, target] of Object.entries(options.targets)) {
|
|
593
617
|
addIncludePatterns(target.includeDirs, targetName);
|
|
594
618
|
}
|
package/dist/vite.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.mjs","sources":["../node_modules/ms/index.js","../node_modules/debug/src/common.js","../node_modules/debug/src/browser.js","../src/vite/logger.ts","../src/vite/index.ts"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","// emsdk-env - Emscripten environment builder\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/emsdk-env\n\nimport type { LogLevel, Logger as ViteLogger } from 'vite';\nimport createDebug from 'debug';\n\nimport { Logger } from '../types';\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\n// Vite logger adapter with prefix\nexport const createViteLoggerAdapter = (\n viteLogger: ViteLogger,\n logLevel: LogLevel,\n prefix: string\n): Logger => {\n // Create debug instance with vite:plugin:prettier-max namespace\n const debug = createDebug('vite:plugin:emsdk-vite');\n\n return {\n debug: (msg: string) => {\n // Use debug module for debug level (enabled with vite --debug or DEBUG=vite:*)\n debug(msg);\n },\n info:\n logLevel !== 'silent'\n ? (msg: string) => viteLogger.info(`[${prefix}]: ${msg}`)\n : () => {},\n warn:\n logLevel === 'warn' || logLevel === 'info' || logLevel === 'error'\n ? (msg: string) => viteLogger.warn(`[${prefix}]: ${msg}`)\n : () => {},\n error:\n logLevel !== 'silent'\n ? (msg: string) => viteLogger.error(`[${prefix}]: ${msg}`)\n : () => {},\n };\n};\n","// emsdk-env - Emscripten environment builder\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/emsdk-env\n\nimport { isAbsolute, relative, resolve } from 'path';\nimport type { Plugin, ResolvedConfig, ViteDevServer } from 'vite';\n\nimport type { EmsdkVitePluginOptions } from './types';\nimport { createViteLoggerAdapter } from './logger';\nimport { buildWasm } from '../index';\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nconst DEFAULT_WASM_SRC_DIR = 'wasm';\nconst buildRuns = new Map<string, Promise<void>>();\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nconst resolvePath = (rootDir: string, value: string) =>\n isAbsolute(value) ? value : resolve(rootDir, value);\n\nconst expandPlaceholders = (\n value: string,\n env: Record<string, string>,\n label: string\n) =>\n value.replace(/\\{([A-Z0-9_]+)\\}/g, (_match, key: string) => {\n const replacement = env[key];\n if (replacement === undefined) {\n throw new Error(`Unknown placeholder {${key}} in ${label}.`);\n }\n return replacement;\n });\n\nconst expandArray = (\n values: readonly string[],\n env: Record<string, string>,\n label: string\n) => values.map((value) => expandPlaceholders(value, env, label));\n\nconst resolveIncludeDirs = (\n includeDirs: readonly string[],\n env: Record<string, string>,\n rootDir: string\n) => {\n const expanded = expandArray(includeDirs, env, 'includeDirs');\n return expanded.map((value) => resolvePath(rootDir, value));\n};\n\nconst createBuildOptions = (\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig,\n logger: ReturnType<typeof createViteLoggerAdapter>\n) => {\n const { emsdk, srcDir, outDir, buildDir, cleanupBuildDir, ...rule } = options;\n return {\n rule,\n root: resolvedConfig.root,\n logger,\n ...(emsdk !== undefined ? { emsdk } : {}),\n ...(srcDir !== undefined ? { srcDir } : {}),\n ...(outDir !== undefined ? { outDir } : {}),\n ...(buildDir !== undefined ? { buildDir } : {}),\n ...(cleanupBuildDir !== undefined ? { cleanupBuildDir } : {}),\n };\n};\n\nconst isSubPath = (parentDir: string, targetPath: string) => {\n const rel = relative(parentDir, targetPath);\n if (rel === '') {\n return true;\n }\n return !rel.startsWith('..') && !isAbsolute(rel);\n};\n\nconst resolveWatchTargets = (\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig\n) => {\n const rootDir = resolvedConfig.root;\n const baseEnv = {\n ROOT: rootDir,\n };\n const rawSrcDir = expandPlaceholders(\n options.srcDir ?? DEFAULT_WASM_SRC_DIR,\n baseEnv,\n 'srcDir'\n );\n const srcDir = resolvePath(rootDir, rawSrcDir);\n\n const envWithDirs = {\n ROOT: rootDir,\n SRC_DIR: srcDir,\n };\n\n const patterns = new Set<string>();\n const baseDirs = new Set<string>();\n const resolvedIncludeDirs: string[] = [];\n patterns.add(srcDir);\n baseDirs.add(srcDir);\n\n const addIncludePatterns = (\n targetIncludeDirs: readonly string[] | undefined,\n targetName: string | undefined\n ) => {\n if (!targetIncludeDirs || targetIncludeDirs.length === 0) {\n return;\n }\n const env = targetName\n ? { ...envWithDirs, TARGET_NAME: targetName }\n : envWithDirs;\n const resolvedDirs = resolveIncludeDirs(targetIncludeDirs, env, rootDir);\n for (const dir of resolvedDirs) {\n patterns.add(dir);\n baseDirs.add(dir);\n resolvedIncludeDirs.push(dir);\n }\n };\n\n addIncludePatterns(options.common?.includeDirs, undefined);\n for (const [targetName, target] of Object.entries(options.targets)) {\n addIncludePatterns(target.includeDirs, targetName);\n }\n\n return {\n srcDir,\n includeDirs: resolvedIncludeDirs,\n patterns: [...patterns],\n baseDirs: [...baseDirs],\n };\n};\n\nconst setupDevServer = async (\n server: ViteDevServer,\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig\n) => {\n const logger = createViteLoggerAdapter(\n resolvedConfig.logger,\n resolvedConfig.logLevel ?? 'info',\n 'emsdk-env'\n );\n const buildOptions = createBuildOptions(options, resolvedConfig, logger);\n\n const watchTargets = resolveWatchTargets(options, resolvedConfig);\n logger.debug(`watch root: ${resolvedConfig.root}`);\n logger.debug(`watch srcDir: ${watchTargets.srcDir}`);\n logger.debug(\n `watch includeDirs: ${\n watchTargets.includeDirs.length > 0\n ? watchTargets.includeDirs.join(', ')\n : '(none)'\n }`\n );\n logger.debug(`watch patterns: ${watchTargets.patterns.join(', ')}`);\n logger.debug(`watch baseDirs: ${watchTargets.baseDirs.join(', ')}`);\n if (watchTargets.patterns.length > 0) {\n server.watcher.add(watchTargets.patterns);\n }\n\n let buildQueue = Promise.resolve();\n const queueBuild = async (shouldReload: boolean) => {\n buildQueue = buildQueue.then(async () => {\n try {\n await buildWasm(buildOptions);\n if (shouldReload) {\n server.ws.send({ type: 'full-reload' });\n }\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'Unknown wasm build error.';\n logger.error(`Wasm build failed: ${message}`);\n }\n });\n return buildQueue;\n };\n\n const onWatchEvent = async (eventPath: string) => {\n const resolvedPath = isAbsolute(eventPath)\n ? eventPath\n : resolve(resolvedConfig.root, eventPath);\n if (!watchTargets.baseDirs.some((dir) => isSubPath(dir, resolvedPath))) {\n return;\n }\n await queueBuild(true);\n };\n\n server.watcher.on('add', onWatchEvent);\n server.watcher.on('change', onWatchEvent);\n server.watcher.on('unlink', onWatchEvent);\n\n await queueBuild(false);\n};\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Vite plugin that builds C/C++ sources into WASM using the Emscripten SDK.\n *\n * In dev (`vite serve`), it watches source/include directories and rebuilds on\n * changes. In build (`vite build`), it performs a one-shot build before bundling.\n *\n * @param options - Plugin options including build rules.\n * @returns Vite plugin instance.\n */\nconst emsdkEnv = (options: EmsdkVitePluginOptions): Plugin => {\n let resolvedConfig: ResolvedConfig | undefined;\n return {\n name: 'emsdkEnv',\n enforce: 'pre',\n configResolved(config) {\n resolvedConfig = config;\n },\n async buildStart() {\n if (!resolvedConfig) {\n throw new Error('Vite config was not resolved.');\n }\n if (resolvedConfig.command !== 'build') {\n return;\n }\n const logger = createViteLoggerAdapter(\n resolvedConfig.logger,\n resolvedConfig.logLevel ?? 'info',\n 'emsdk-env'\n );\n const buildOptions = createBuildOptions(options, resolvedConfig, logger);\n const buildKey = resolvedConfig.root;\n const existing = buildRuns.get(buildKey);\n if (existing) {\n await existing;\n return;\n }\n const run = (async () => {\n try {\n await buildWasm(buildOptions);\n } finally {\n buildRuns.delete(buildKey);\n }\n })();\n buildRuns.set(buildKey, run);\n await run;\n },\n async configureServer(server) {\n if (!resolvedConfig) {\n throw new Error('Vite config was not resolved.');\n }\n if (resolvedConfig.command !== 'serve') {\n return;\n }\n await setupDevServer(server, options, resolvedConfig);\n },\n };\n};\n\nexport default emsdkEnv;\n"],"names":["ms","createDebug","require$$0","exports"],"mappings":";;;;;;;;;;;AAIA,MAAI,IAAI;AACR,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AAgBZ,OAAiB,SAAU,KAAK,SAAS;AACvC,cAAU,WAAW,CAAA;AACrB,QAAI,OAAO,OAAO;AAClB,QAAI,SAAS,YAAY,IAAI,SAAS,GAAG;AACvC,aAAO,MAAM,GAAG;AAAA,IACpB,WAAa,SAAS,YAAY,SAAS,GAAG,GAAG;AAC7C,aAAO,QAAQ,OAAO,QAAQ,GAAG,IAAI,SAAS,GAAG;AAAA,IACrD;AACE,UAAM,IAAI;AAAA,MACR,0DACE,KAAK,UAAU,GAAG;AAAA;EAExB;AAUA,WAAS,MAAM,KAAK;AAClB,UAAM,OAAO,GAAG;AAChB,QAAI,IAAI,SAAS,KAAK;AACpB;AAAA,IACJ;AACE,QAAI,QAAQ,mIAAmI;AAAA,MAC7I;AAAA;AAEF,QAAI,CAAC,OAAO;AACV;AAAA,IACJ;AACE,QAAI,IAAI,WAAW,MAAM,CAAC,CAAC;AAC3B,QAAI,QAAQ,MAAM,CAAC,KAAK,MAAM,YAAW;AACzC,YAAQ,MAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,IAAI;AAAA,MACb,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAA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,YAAY;AACrC,SAAO,QAAQ,GAAG,UAAU,YAAY;AACxC,SAAO,QAAQ,GAAG,UAAU,YAAY;AAExC,QAAM,WAAW,KAAK;AACxB;AAaA,MAAM,WAAW,CAAC,YAA4C;AAC5D,MAAI;AACJ,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,eAAe,QAAQ;AACrB,uBAAiB;AAAA,IACnB;AAAA,IACA,MAAM,aAAa;;AACjB,UAAI,CAAC,gBAAgB;AACnB,cAAM,IAAI,MAAM,+BAA+B;AAAA,MACjD;AACA,UAAI,eAAe,YAAY,SAAS;AACtC;AAAA,MACF;AACA,YAAM,SAAS;AAAA,QACb,eAAe;AAAA,SACf,oBAAe,aAAf,YAA2B;AAAA,QAC3B;AAAA,MAAA;AAEF,YAAM,eAAe,mBAAmB,SAAS,gBAAgB,MAAM;AACvE,YAAM,WAAW,eAAe;AAChC,YAAM,WAAW,UAAU,IAAI,QAAQ;AACvC,UAAI,UAAU;AACZ,cAAM;AACN;AAAA,MACF;AACA,YAAM,OAAO,YAAY;AACvB,YAAI;AACF,gBAAM,UAAU,YAAY;AAAA,QAC9B,UAAA;AACE,oBAAU,OAAO,QAAQ;AAAA,QAC3B;AAAA,MACF,GAAA;AACA,gBAAU,IAAI,UAAU,GAAG;AAC3B,YAAM;AAAA,IACR;AAAA,IACA,MAAM,gBAAgB,QAAQ;AAC5B,UAAI,CAAC,gBAAgB;AACnB,cAAM,IAAI,MAAM,+BAA+B;AAAA,MACjD;AACA,UAAI,eAAe,YAAY,SAAS;AACtC;AAAA,MACF;AACA,YAAM,eAAe,QAAQ,SAAS,cAAc;AAAA,IACtD;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"vite.mjs","sources":["../node_modules/ms/index.js","../node_modules/debug/src/common.js","../node_modules/debug/src/browser.js","../src/vite/logger.ts","../src/vite/index.ts"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","// emsdk-env - Emscripten environment builder\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/emsdk-env\n\nimport type { LogLevel, Logger as ViteLogger } from 'vite';\nimport createDebug from 'debug';\n\nimport { Logger } from '../types';\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\n// Vite logger adapter with prefix\nexport const createViteLoggerAdapter = (\n viteLogger: ViteLogger,\n logLevel: LogLevel,\n prefix: string\n): Logger => {\n // Create debug instance with vite:plugin:prettier-max namespace\n const debug = createDebug('vite:plugin:emsdk-vite');\n\n return {\n debug: (msg: string) => {\n // Use debug module for debug level (enabled with vite --debug or DEBUG=vite:*)\n debug(msg);\n },\n info:\n logLevel !== 'silent'\n ? (msg: string) => viteLogger.info(`[${prefix}]: ${msg}`)\n : () => {},\n warn:\n logLevel === 'warn' || logLevel === 'info' || logLevel === 'error'\n ? (msg: string) => viteLogger.warn(`[${prefix}]: ${msg}`)\n : () => {},\n error:\n logLevel !== 'silent'\n ? (msg: string) => viteLogger.error(`[${prefix}]: ${msg}`)\n : () => {},\n };\n};\n","// emsdk-env - Emscripten environment builder\n// Copyright (c) Kouji Matsui. (@kekyo@mi.kekyo.net)\n// Under MIT.\n// https://github.com/kekyo/emsdk-env\n\nimport { isAbsolute, relative, resolve } from 'path';\nimport type { Plugin, ResolvedConfig, ViteDevServer } from 'vite';\n\nimport type { BuildWasmOptions, Logger } from '../types';\nimport { buildWasm } from '../build';\nimport type { EmsdkVitePluginOptions } from './types';\nimport { createViteLoggerAdapter } from './logger';\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nconst DEFAULT_WASM_SRC_DIR = 'wasm';\nconst DEFAULT_WASM_INCLUDE_DIR = 'include';\nconst buildRuns = new Map<string, Promise<void>>();\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\nconst resolvePath = (rootDir: string, value: string) =>\n isAbsolute(value) ? value : resolve(rootDir, value);\n\nconst expandPlaceholders = (\n value: string,\n env: Record<string, string>,\n label: string\n) =>\n value.replace(/\\{([A-Z0-9_]+)\\}/g, (_match, key: string) => {\n const replacement = env[key];\n if (replacement === undefined) {\n throw new Error(`Unknown placeholder {${key}} in ${label}.`);\n }\n return replacement;\n });\n\nconst expandArray = (\n values: readonly string[],\n env: Record<string, string>,\n label: string\n) => values.map((value) => expandPlaceholders(value, env, label));\n\nconst resolveIncludeDirs = (\n includeDirs: readonly string[],\n env: Record<string, string>,\n rootDir: string\n) => {\n const expanded = expandArray(includeDirs, env, 'includeDirs');\n return expanded.map((value) => resolvePath(rootDir, value));\n};\n\nconst createBuildOptions = (\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig,\n logger: Logger\n): BuildWasmOptions => {\n const {\n emsdk,\n srcDir,\n includeDir,\n imports,\n outDir,\n libDir,\n buildDir,\n cleanupBuildDir,\n parallel,\n ...rule\n } = options;\n return {\n rule,\n root: resolvedConfig.root,\n logger,\n ...(emsdk !== undefined ? { emsdk } : {}),\n ...(srcDir !== undefined ? { srcDir } : {}),\n ...(includeDir !== undefined ? { includeDir } : {}),\n ...(imports !== undefined ? { imports } : {}),\n ...(outDir !== undefined ? { outDir } : {}),\n ...(libDir !== undefined ? { libDir } : {}),\n ...(buildDir !== undefined ? { buildDir } : {}),\n ...(cleanupBuildDir !== undefined ? { cleanupBuildDir } : {}),\n ...(parallel !== undefined ? { parallel } : {}),\n };\n};\n\nconst isSubPath = (parentDir: string, targetPath: string) => {\n const rel = relative(parentDir, targetPath);\n if (rel === '') {\n return true;\n }\n return !rel.startsWith('..') && !isAbsolute(rel);\n};\n\nconst resolveWatchTargets = (\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig\n) => {\n const rootDir = resolvedConfig.root;\n const baseEnv = {\n ROOT: rootDir,\n };\n const rawSrcDir = expandPlaceholders(\n options.srcDir ?? DEFAULT_WASM_SRC_DIR,\n baseEnv,\n 'srcDir'\n );\n const rawIncludeDir = expandPlaceholders(\n options.includeDir ?? DEFAULT_WASM_INCLUDE_DIR,\n baseEnv,\n 'includeDir'\n );\n const srcDir = resolvePath(rootDir, rawSrcDir);\n const includeDir = resolvePath(rootDir, rawIncludeDir);\n\n const envWithDirs = {\n ROOT: rootDir,\n SRC_DIR: srcDir,\n INCLUDE_DIR: includeDir,\n };\n\n const patterns = new Set<string>();\n const baseDirs = new Set<string>();\n const resolvedIncludeDirs: string[] = [];\n patterns.add(srcDir);\n baseDirs.add(srcDir);\n\n const addIncludePatterns = (\n targetIncludeDirs: readonly string[] | undefined,\n targetName: string | undefined\n ) => {\n if (!targetIncludeDirs || targetIncludeDirs.length === 0) {\n return;\n }\n const env = targetName\n ? { ...envWithDirs, TARGET_NAME: targetName }\n : envWithDirs;\n const resolvedDirs = resolveIncludeDirs(targetIncludeDirs, env, rootDir);\n for (const dir of resolvedDirs) {\n patterns.add(dir);\n baseDirs.add(dir);\n resolvedIncludeDirs.push(dir);\n }\n };\n\n const commonIncludeDirs =\n options.common?.includeDirs === undefined\n ? [rawIncludeDir]\n : options.common.includeDirs;\n addIncludePatterns(commonIncludeDirs, undefined);\n for (const [targetName, target] of Object.entries(options.targets)) {\n addIncludePatterns(target.includeDirs, targetName);\n }\n\n return {\n srcDir,\n includeDirs: resolvedIncludeDirs,\n patterns: [...patterns],\n baseDirs: [...baseDirs],\n };\n};\n\nconst setupDevServer = async (\n server: ViteDevServer,\n options: EmsdkVitePluginOptions,\n resolvedConfig: ResolvedConfig\n) => {\n const logger = createViteLoggerAdapter(\n resolvedConfig.logger,\n resolvedConfig.logLevel ?? 'info',\n 'emsdk-env'\n );\n const buildOptions = createBuildOptions(options, resolvedConfig, logger);\n\n const watchTargets = resolveWatchTargets(options, resolvedConfig);\n logger.debug(`watch root: ${resolvedConfig.root}`);\n logger.debug(`watch srcDir: ${watchTargets.srcDir}`);\n logger.debug(\n `watch includeDirs: ${\n watchTargets.includeDirs.length > 0\n ? watchTargets.includeDirs.join(', ')\n : '(none)'\n }`\n );\n logger.debug(`watch patterns: ${watchTargets.patterns.join(', ')}`);\n logger.debug(`watch baseDirs: ${watchTargets.baseDirs.join(', ')}`);\n if (watchTargets.patterns.length > 0) {\n server.watcher.add(watchTargets.patterns);\n }\n\n let buildQueue = Promise.resolve();\n const queueBuild = async (shouldReload: boolean) => {\n buildQueue = buildQueue.then(async () => {\n try {\n await buildWasm(buildOptions);\n if (shouldReload) {\n server.ws.send({ type: 'full-reload' });\n }\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'Unknown wasm build error.';\n logger.error(`Wasm build failed: ${message}`);\n }\n });\n return buildQueue;\n };\n\n const onWatchEvent = async (eventPath: string) => {\n const resolvedPath = isAbsolute(eventPath)\n ? eventPath\n : resolve(resolvedConfig.root, eventPath);\n if (!watchTargets.baseDirs.some((dir) => isSubPath(dir, resolvedPath))) {\n return;\n }\n await queueBuild(true);\n };\n\n server.watcher.on('add', onWatchEvent);\n server.watcher.on('change', onWatchEvent);\n server.watcher.on('unlink', onWatchEvent);\n\n await queueBuild(false);\n};\n\n/////////////////////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Vite plugin that builds C/C++ sources into WASM using the Emscripten SDK.\n *\n * In dev (`vite serve`), it watches source/include directories and rebuilds on\n * changes. In build (`vite build`), it performs a one-shot build before bundling.\n *\n * @param options - Plugin options including build rules.\n * @returns Vite plugin instance.\n */\nconst emsdkEnv = (options: EmsdkVitePluginOptions): Plugin => {\n let resolvedConfig: ResolvedConfig | undefined;\n return {\n name: 'emsdkEnv',\n enforce: 'pre',\n configResolved(config) {\n resolvedConfig = config;\n },\n async buildStart() {\n if (!resolvedConfig) {\n throw new Error('Vite config was not resolved.');\n }\n if (resolvedConfig.command !== 'build') {\n return;\n }\n const logger = createViteLoggerAdapter(\n resolvedConfig.logger,\n resolvedConfig.logLevel ?? 'info',\n 'emsdk-env'\n );\n const buildOptions = createBuildOptions(options, resolvedConfig, logger);\n const buildKey = resolvedConfig.root;\n const existing = buildRuns.get(buildKey);\n if (existing) {\n await existing;\n return;\n }\n const run = (async () => {\n try {\n await buildWasm(buildOptions);\n } finally {\n buildRuns.delete(buildKey);\n }\n })();\n buildRuns.set(buildKey, run);\n await run;\n },\n async configureServer(server) {\n if (!resolvedConfig) {\n throw new Error('Vite config was not resolved.');\n }\n if (resolvedConfig.command !== 'serve') {\n return;\n }\n await setupDevServer(server, options, resolvedConfig);\n },\n };\n};\n\nexport default emsdkEnv;\n"],"names":["ms","createDebug","require$$0","exports"],"mappings":";;;;;;;;;;;AAIA,MAAI,IAAI;AACR,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AACZ,MAAI,IAAI,IAAI;AAgBZ,OAAiB,SAAU,KAAK,SAAS;AACvC,cAAU,WAAW,CAAA;AACrB,QAAI,OAAO,OAAO;AAClB,QAAI,SAAS,YAAY,IAAI,SAAS,GAAG;AACvC,aAAO,MAAM,GAAG;AAAA,IACpB,WAAa,SAAS,YAAY,SAAS,GAAG,GAAG;AAC7C,aAAO,QAAQ,OAAO,QAAQ,GAAG,IAAI,SAAS,GAAG;AAAA,IACrD;AACE,UAAM,IAAI;AAAA,MACR,0DACE,KAAK,UAAU,GAAG;AAAA;EAExB;AAUA,WAAS,MAAM,KAAK;AAClB,UAAM,OAAO,GAAG;AAChB,QAAI,IAAI,SAAS,KAAK;AACpB;AAAA,IACJ;AACE,QAAI,QAAQ,mIAAmI;AAAA,MAC7I;AAAA;AAEF,QAAI,CAAC,OAAO;AACV;AAAA,IACJ;AACE,QAAI,IAAI,WAAW,MAAM,CAAC,CAAC;AAC3B,QAAI,QAAQ,MAAM,CAAC,KAAK,MAAM,YAAW;AACzC,YAAQ,MAAI;AAAA,MACV,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,IAAI;AAAA,MACb,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,IAAI;AAAA,MACb,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,IAAI;AAAA,MACb,KAAK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AU,GAAG;AAC3B,YAAM;AAAA,IACR;AAAA,IACA,MAAM,gBAAgB,QAAQ;AAC5B,UAAI,CAAC,gBAAgB;AACnB,cAAM,IAAI,MAAM,+BAA+B;AAAA,MACjD;AACA,UAAI,eAAe,YAAY,SAAS;AACtC;AAAA,MACF;AACA,YAAM,eAAe,QAAQ,SAAS,cAAc;AAAA,IACtD;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0,1,2]}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"git": {
|
|
3
3
|
"tags": [
|
|
4
|
-
"0.
|
|
4
|
+
"0.4.0"
|
|
5
5
|
],
|
|
6
6
|
"branches": [
|
|
7
7
|
"main"
|
|
8
8
|
],
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.4.0",
|
|
10
10
|
"commit": {
|
|
11
|
-
"hash": "
|
|
12
|
-
"shortHash": "
|
|
13
|
-
"date": "2026-02-
|
|
11
|
+
"hash": "cd0d8e53bf52b98940dd50343a9d3a39200306bd",
|
|
12
|
+
"shortHash": "cd0d8e5",
|
|
13
|
+
"date": "2026-02-20T14:55:40+09:00",
|
|
14
14
|
"message": "Merge branch 'develop'"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.4.0",
|
|
18
18
|
"name": "emsdk-env",
|
|
19
19
|
"description": "Emscripten environment builder",
|
|
20
20
|
"author": "Kouji Matsui (@kekyo@mi.kekyo.net)",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"vite-plugin-dts": ">=4.5.0",
|
|
75
75
|
"vitest": ">=1.0.0"
|
|
76
76
|
},
|
|
77
|
-
"buildDate": "2026-02-
|
|
77
|
+
"buildDate": "2026-02-20T15:00:59+09:00"
|
|
78
78
|
}
|