vitest-pool-assemblyscript 0.2.0 → 0.2.2
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 +22 -8
- package/assembly/compare.ts +1 -1
- package/assembly/expect.ts +2 -2
- package/binding.gyp +4 -4
- package/dist/{compile-runner-8h0dBwG2.mjs → compile-runner-xGvQwgNf.mjs} +2 -2
- package/dist/{compile-runner-8h0dBwG2.mjs.map → compile-runner-xGvQwgNf.mjs.map} +1 -1
- package/dist/config/index-v3.d.mts +2 -2
- package/dist/config/index.d.mts +3 -3
- package/dist/{custom-provider-options-CF5C1kXb.d.mts → custom-provider-options-CVLz0nAp.d.mts} +2 -2
- package/dist/{custom-provider-options-CF5C1kXb.d.mts.map → custom-provider-options-CVLz0nAp.d.mts.map} +1 -1
- package/dist/index-internal.d.mts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/{load-user-imports-J9eaAW0_.mjs → load-user-imports-Bbmpaciu.mjs} +5 -4
- package/dist/{load-user-imports-J9eaAW0_.mjs.map → load-user-imports-Bbmpaciu.mjs.map} +1 -1
- package/dist/{pool-runner-init-CEwLyNI3.d.mts → pool-runner-init-8vx-5Pb4.d.mts} +2 -2
- package/dist/pool-runner-init-8vx-5Pb4.d.mts.map +1 -0
- package/dist/pool-thread/compile-worker-thread.d.mts +1 -1
- package/dist/pool-thread/compile-worker-thread.mjs +2 -2
- package/dist/pool-thread/test-worker-thread.d.mts +1 -1
- package/dist/pool-thread/test-worker-thread.mjs +2 -2
- package/dist/pool-thread/v3-tinypool-thread.d.mts +1 -1
- package/dist/pool-thread/v3-tinypool-thread.mjs +3 -3
- package/dist/{test-runner-B2BpyPNK.mjs → test-runner-BR4XyhMA.mjs} +2 -2
- package/dist/{test-runner-B2BpyPNK.mjs.map → test-runner-BR4XyhMA.mjs.map} +1 -1
- package/dist/{types-8KKo9Hbf.d.mts → types-DasF0_PX.d.mts} +1 -2
- package/dist/types-DasF0_PX.d.mts.map +1 -0
- package/package.json +18 -2
- package/prebuilds/linux-x64/vitest-pool-assemblyscript.glibc.node +0 -0
- package/prebuilds/linux-x64/vitest-pool-assemblyscript.musl.node +0 -0
- package/scripts/setup-binaryen.js +253 -79
- package/src/native-instrumentation/addon.cpp +2 -2
- package/dist/pool-runner-init-CEwLyNI3.d.mts.map +0 -1
- package/dist/types-8KKo9Hbf.d.mts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest-pool-assemblyscript",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "AssemblyScript testing with Vitest - Simple, fast, familiar, AS-native, with full coverage output",
|
|
5
|
+
"author": "Matt Ritter <matthew.d.ritter@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"assemblyscript",
|
|
9
|
+
"vitest",
|
|
10
|
+
"unit test",
|
|
11
|
+
"unit testing",
|
|
12
|
+
"webassembly",
|
|
13
|
+
"wasm",
|
|
14
|
+
"testing",
|
|
15
|
+
"testing framework",
|
|
16
|
+
"test runner",
|
|
17
|
+
"compile-to-wasm",
|
|
18
|
+
"custom pool",
|
|
19
|
+
"vitest plugin"
|
|
20
|
+
],
|
|
5
21
|
"type": "module",
|
|
6
22
|
"main": "./dist/index.mjs",
|
|
7
23
|
"types": "./dist/index.d.mts",
|
|
@@ -67,7 +83,7 @@
|
|
|
67
83
|
"//------------ Native Addon ------------": "",
|
|
68
84
|
"setup-binaryen": "node scripts/setup-binaryen.js",
|
|
69
85
|
"build:native": "node-gyp rebuild",
|
|
70
|
-
"build:
|
|
86
|
+
"build:prebuild": "prebuildify --napi --strip --tag-libc",
|
|
71
87
|
"install": "node scripts/install.js"
|
|
72
88
|
},
|
|
73
89
|
"dependencies": {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
+
import os from 'os';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import https from 'https';
|
|
4
5
|
import { execSync } from 'child_process';
|
|
@@ -9,7 +10,9 @@ const BINARYEN_VERSION = fs.readFileSync(
|
|
|
9
10
|
'utf8'
|
|
10
11
|
).trim();
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
const IS_MACOS = process.platform === 'darwin';
|
|
14
|
+
|
|
15
|
+
// Detect platform for prebuilt binaries (non-macOS only)
|
|
13
16
|
function detectPlatform() {
|
|
14
17
|
const platform = process.platform;
|
|
15
18
|
const arch = process.arch;
|
|
@@ -31,6 +34,36 @@ function detectPlatform() {
|
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
|
|
37
|
+
// Map Node.js arch to CMake OSX architecture identifier
|
|
38
|
+
function getCmakeOsxArch() {
|
|
39
|
+
if (process.arch === 'arm64') return 'arm64';
|
|
40
|
+
if (process.arch === 'x64') return 'x86_64';
|
|
41
|
+
throw new Error(`Unsupported macOS architecture: ${process.arch}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Run a command quietly, but print its output if it fails
|
|
45
|
+
function execQuiet(command) {
|
|
46
|
+
try {
|
|
47
|
+
execSync(command, { stdio: 'pipe' });
|
|
48
|
+
} catch (err) {
|
|
49
|
+
const output = err.stderr?.toString() || err.stdout?.toString() || '';
|
|
50
|
+
if (output) {
|
|
51
|
+
console.error(output);
|
|
52
|
+
}
|
|
53
|
+
throw err;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Check if a command is available on PATH
|
|
58
|
+
function isCommandAvailable(command) {
|
|
59
|
+
try {
|
|
60
|
+
execSync(`which ${command}`, { stdio: 'pipe' });
|
|
61
|
+
return true;
|
|
62
|
+
} catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
34
67
|
const PLATFORM = detectPlatform();
|
|
35
68
|
const PREBUILT_URL = `https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/binaryen-${BINARYEN_VERSION}-${PLATFORM}.tar.gz`;
|
|
36
69
|
const SOURCE_URL = `https://github.com/WebAssembly/binaryen/archive/refs/tags/${BINARYEN_VERSION}.tar.gz`;
|
|
@@ -42,88 +75,162 @@ const TEMP_DIR = path.join(THIRD_PARTY_DIR, 'binaryen-temp');
|
|
|
42
75
|
|
|
43
76
|
console.log(`Setting up Binaryen ${BINARYEN_VERSION}...`);
|
|
44
77
|
console.log(`Platform: ${PLATFORM}`);
|
|
78
|
+
|
|
79
|
+
if (IS_MACOS) {
|
|
80
|
+
console.log('macOS detected: will build static library from source');
|
|
81
|
+
}
|
|
82
|
+
|
|
45
83
|
console.log('');
|
|
46
84
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
85
|
+
if (IS_MACOS) {
|
|
86
|
+
// macOS: Build Binaryen from source to produce libbinaryen.a
|
|
87
|
+
// The official macOS prebuilt release only ships libbinaryen.dylib (shared),
|
|
88
|
+
// which cannot be statically linked into our .node addon. Building from source
|
|
89
|
+
// with BUILD_STATIC_LIB=ON produces the .a file our binding.gyp expects.
|
|
90
|
+
setupMacOS();
|
|
91
|
+
} else {
|
|
92
|
+
// Linux/Windows: Download prebuilt static library + source headers
|
|
93
|
+
setupWithPrebuilt();
|
|
94
|
+
}
|
|
53
95
|
|
|
54
|
-
|
|
55
|
-
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
// macOS: build from source
|
|
98
|
+
// ---------------------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
function setupMacOS() {
|
|
101
|
+
if (!isCommandAvailable('cmake')) {
|
|
102
|
+
console.error('Error: cmake is required to build Binaryen on macOS but was not found.');
|
|
103
|
+
console.error('Install it with: brew install cmake');
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
console.log('Step 1: Downloading source code...');
|
|
56
108
|
console.log(`URL: ${SOURCE_URL}`);
|
|
57
109
|
downloadFile(SOURCE_URL, SOURCE_ARCHIVE, () => {
|
|
58
110
|
console.log('✓ Source code downloaded');
|
|
59
111
|
console.log('');
|
|
60
|
-
|
|
61
|
-
extractAndCombine();
|
|
112
|
+
extractAndBuildFromSource();
|
|
62
113
|
});
|
|
63
|
-
}
|
|
114
|
+
}
|
|
64
115
|
|
|
65
|
-
function
|
|
66
|
-
|
|
116
|
+
function extractAndBuildFromSource() {
|
|
117
|
+
console.log('Step 2: Extracting source code...');
|
|
67
118
|
|
|
68
|
-
|
|
69
|
-
response.pipe(file);
|
|
70
|
-
file.on('finish', () => {
|
|
71
|
-
file.close(() => {
|
|
72
|
-
response.destroy();
|
|
73
|
-
callback();
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
file.on('error', (err) => {
|
|
77
|
-
response.destroy();
|
|
78
|
-
if (fs.existsSync(dest)) {
|
|
79
|
-
fs.unlinkSync(dest);
|
|
80
|
-
}
|
|
81
|
-
console.error(`File write failed: ${err.message}`);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
});
|
|
84
|
-
};
|
|
119
|
+
ensureCleanDirs();
|
|
85
120
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (fs.existsSync(dest)) {
|
|
93
|
-
fs.unlinkSync(dest);
|
|
94
|
-
}
|
|
95
|
-
console.error(`Download failed: ${err.message}`);
|
|
96
|
-
process.exit(1);
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
handleResponse(response);
|
|
121
|
+
try {
|
|
122
|
+
execSync(`tar -xzf "${SOURCE_ARCHIVE}" -C "${TEMP_DIR}"`, { stdio: 'pipe' });
|
|
123
|
+
const sourceDir = path.join(TEMP_DIR, `binaryen-${BINARYEN_VERSION}`);
|
|
124
|
+
|
|
125
|
+
if (!fs.existsSync(sourceDir)) {
|
|
126
|
+
throw new Error(`Expected source directory not found: ${sourceDir}`);
|
|
100
127
|
}
|
|
101
|
-
});
|
|
102
128
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
129
|
+
console.log('✓ Source code extracted');
|
|
130
|
+
console.log('');
|
|
131
|
+
|
|
132
|
+
// Build static library with cmake
|
|
133
|
+
console.log('Step 3: Building static library with cmake...');
|
|
134
|
+
|
|
135
|
+
const buildDir = path.join(sourceDir, 'build');
|
|
136
|
+
const osxArch = getCmakeOsxArch();
|
|
137
|
+
const cpuCount = os.cpus().length;
|
|
138
|
+
const useNinja = isCommandAvailable('ninja');
|
|
139
|
+
const generatorArgs = useNinja ? ['-G', 'Ninja'] : [];
|
|
140
|
+
|
|
141
|
+
console.log(` Architecture: ${osxArch}`);
|
|
142
|
+
console.log(` Generator: ${useNinja ? 'Ninja' : 'Unix Makefiles (default)'}`);
|
|
143
|
+
console.log(` Parallel jobs: ${cpuCount}`);
|
|
144
|
+
console.log('');
|
|
145
|
+
|
|
146
|
+
// Configure
|
|
147
|
+
console.log(' Configuring...');
|
|
148
|
+
const configureArgs = [
|
|
149
|
+
'cmake',
|
|
150
|
+
'-S', sourceDir,
|
|
151
|
+
'-B', buildDir,
|
|
152
|
+
...generatorArgs,
|
|
153
|
+
'-DCMAKE_BUILD_TYPE=Release',
|
|
154
|
+
'-DBUILD_STATIC_LIB=ON',
|
|
155
|
+
'-DBUILD_TESTS=OFF',
|
|
156
|
+
'-DBUILD_TOOLS=OFF',
|
|
157
|
+
'-DENABLE_WERROR=OFF',
|
|
158
|
+
`-DCMAKE_OSX_ARCHITECTURES=${osxArch}`,
|
|
159
|
+
];
|
|
160
|
+
execQuiet(configureArgs.join(' '));
|
|
161
|
+
console.log(' ✓ Configure complete');
|
|
162
|
+
|
|
163
|
+
// Build (only the binaryen library target, not CLI tools)
|
|
164
|
+
console.log(' Building (this may take several minutes)...');
|
|
165
|
+
execQuiet(`cmake --build "${buildDir}" --target binaryen -j${cpuCount}`);
|
|
166
|
+
console.log(' ✓ Build complete');
|
|
167
|
+
console.log('');
|
|
168
|
+
|
|
169
|
+
// Assemble third_party/binaryen/ with lib/ and src/
|
|
170
|
+
console.log('Step 4: Installing to third_party/binaryen/...');
|
|
171
|
+
|
|
172
|
+
fs.mkdirSync(BINARYEN_DIR, { recursive: true });
|
|
173
|
+
|
|
174
|
+
// Copy static library
|
|
175
|
+
const builtLib = path.join(buildDir, 'lib', 'libbinaryen.a');
|
|
176
|
+
if (!fs.existsSync(builtLib)) {
|
|
177
|
+
throw new Error(`Built static library not found at ${builtLib}`);
|
|
106
178
|
}
|
|
107
|
-
|
|
179
|
+
const destLibDir = path.join(BINARYEN_DIR, 'lib');
|
|
180
|
+
fs.mkdirSync(destLibDir, { recursive: true });
|
|
181
|
+
fs.cpSync(builtLib, path.join(destLibDir, 'libbinaryen.a'));
|
|
182
|
+
console.log(' ✓ Copied libbinaryen.a');
|
|
183
|
+
|
|
184
|
+
// Copy C++ headers from source
|
|
185
|
+
const sourceSrcDir = path.join(sourceDir, 'src');
|
|
186
|
+
const destSrcDir = path.join(BINARYEN_DIR, 'src');
|
|
187
|
+
if (fs.existsSync(sourceSrcDir)) {
|
|
188
|
+
fs.cpSync(sourceSrcDir, destSrcDir, { recursive: true });
|
|
189
|
+
console.log(' ✓ Copied C++ headers');
|
|
190
|
+
} else {
|
|
191
|
+
throw new Error('Source src/ directory not found');
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Clean up
|
|
195
|
+
console.log(' Cleaning up...');
|
|
196
|
+
fs.rmSync(TEMP_DIR, { recursive: true, force: true });
|
|
197
|
+
fs.unlinkSync(SOURCE_ARCHIVE);
|
|
198
|
+
|
|
199
|
+
printResult();
|
|
200
|
+
} catch (err) {
|
|
201
|
+
console.error('macOS source build failed:', err.message);
|
|
202
|
+
console.error('Ensure cmake is installed: brew install cmake');
|
|
203
|
+
console.error('For faster builds, also install ninja: brew install ninja');
|
|
108
204
|
process.exit(1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// ---------------------------------------------------------------------------
|
|
209
|
+
// Linux/Windows: download prebuilt static library + source headers
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
|
|
212
|
+
function setupWithPrebuilt() {
|
|
213
|
+
console.log('Step 1: Downloading prebuilt binaries...');
|
|
214
|
+
console.log(`URL: ${PREBUILT_URL}`);
|
|
215
|
+
downloadFile(PREBUILT_URL, PREBUILT_ARCHIVE, () => {
|
|
216
|
+
console.log('✓ Prebuilt binaries downloaded');
|
|
217
|
+
console.log('');
|
|
218
|
+
|
|
219
|
+
console.log('Step 2: Downloading source code for headers...');
|
|
220
|
+
console.log(`URL: ${SOURCE_URL}`);
|
|
221
|
+
downloadFile(SOURCE_URL, SOURCE_ARCHIVE, () => {
|
|
222
|
+
console.log('✓ Source code downloaded');
|
|
223
|
+
console.log('');
|
|
224
|
+
|
|
225
|
+
extractAndCombine();
|
|
226
|
+
});
|
|
109
227
|
});
|
|
110
228
|
}
|
|
111
229
|
|
|
112
230
|
function extractAndCombine() {
|
|
113
231
|
console.log('Step 3: Extracting and combining...');
|
|
114
232
|
|
|
115
|
-
|
|
116
|
-
if (!fs.existsSync(THIRD_PARTY_DIR)) {
|
|
117
|
-
fs.mkdirSync(THIRD_PARTY_DIR, { recursive: true });
|
|
118
|
-
}
|
|
119
|
-
if (!fs.existsSync(TEMP_DIR)) {
|
|
120
|
-
fs.mkdirSync(TEMP_DIR, { recursive: true });
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Remove existing binaryen directory if it exists
|
|
124
|
-
if (fs.existsSync(BINARYEN_DIR)) {
|
|
125
|
-
fs.rmSync(BINARYEN_DIR, { recursive: true, force: true });
|
|
126
|
-
}
|
|
233
|
+
ensureCleanDirs();
|
|
127
234
|
|
|
128
235
|
try {
|
|
129
236
|
// Extract prebuilt binaries
|
|
@@ -154,26 +261,93 @@ function extractAndCombine() {
|
|
|
154
261
|
fs.unlinkSync(PREBUILT_ARCHIVE);
|
|
155
262
|
fs.unlinkSync(SOURCE_ARCHIVE);
|
|
156
263
|
|
|
157
|
-
|
|
158
|
-
console.log(`✓ Binaryen ${BINARYEN_VERSION} installed to third_party/binaryen`);
|
|
159
|
-
console.log('');
|
|
160
|
-
console.log('Contents:');
|
|
161
|
-
const contents = fs.readdirSync(BINARYEN_DIR);
|
|
162
|
-
console.log(contents.map(f => ` ${f}`).join('\n'));
|
|
163
|
-
|
|
164
|
-
const libDir = path.join(BINARYEN_DIR, 'lib');
|
|
165
|
-
if (fs.existsSync(libDir)) {
|
|
166
|
-
console.log('');
|
|
167
|
-
console.log('Library files:');
|
|
168
|
-
const libFiles = fs.readdirSync(libDir);
|
|
169
|
-
console.log(libFiles.map(f => ` ${f}`).join('\n'));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
console.log('');
|
|
173
|
-
console.log('Setup complete!');
|
|
264
|
+
printResult();
|
|
174
265
|
} catch (err) {
|
|
175
266
|
console.error('Extraction/combination failed:', err.message);
|
|
176
267
|
console.error('Make sure tar is available on your system.');
|
|
177
268
|
process.exit(1);
|
|
178
269
|
}
|
|
179
270
|
}
|
|
271
|
+
|
|
272
|
+
// ---------------------------------------------------------------------------
|
|
273
|
+
// Shared helpers
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
|
|
276
|
+
function ensureCleanDirs() {
|
|
277
|
+
if (!fs.existsSync(THIRD_PARTY_DIR)) {
|
|
278
|
+
fs.mkdirSync(THIRD_PARTY_DIR, { recursive: true });
|
|
279
|
+
}
|
|
280
|
+
if (!fs.existsSync(TEMP_DIR)) {
|
|
281
|
+
fs.mkdirSync(TEMP_DIR, { recursive: true });
|
|
282
|
+
}
|
|
283
|
+
if (fs.existsSync(BINARYEN_DIR)) {
|
|
284
|
+
fs.rmSync(BINARYEN_DIR, { recursive: true, force: true });
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function printResult() {
|
|
289
|
+
console.log('');
|
|
290
|
+
console.log(`✓ Binaryen ${BINARYEN_VERSION} installed to third_party/binaryen`);
|
|
291
|
+
console.log('');
|
|
292
|
+
console.log('Contents:');
|
|
293
|
+
const contents = fs.readdirSync(BINARYEN_DIR);
|
|
294
|
+
console.log(contents.map(f => ` ${f}`).join('\n'));
|
|
295
|
+
|
|
296
|
+
const libDir = path.join(BINARYEN_DIR, 'lib');
|
|
297
|
+
if (fs.existsSync(libDir)) {
|
|
298
|
+
console.log('');
|
|
299
|
+
console.log('Library files:');
|
|
300
|
+
const libFiles = fs.readdirSync(libDir);
|
|
301
|
+
console.log(libFiles.map(f => ` ${f}`).join('\n'));
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
console.log('');
|
|
305
|
+
console.log('Setup complete!');
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function downloadFile(url, dest, callback) {
|
|
309
|
+
const file = fs.createWriteStream(dest);
|
|
310
|
+
|
|
311
|
+
const handleResponse = (response) => {
|
|
312
|
+
response.pipe(file);
|
|
313
|
+
file.on('finish', () => {
|
|
314
|
+
file.close(() => {
|
|
315
|
+
response.destroy();
|
|
316
|
+
callback();
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
file.on('error', (err) => {
|
|
320
|
+
response.destroy();
|
|
321
|
+
if (fs.existsSync(dest)) {
|
|
322
|
+
fs.unlinkSync(dest);
|
|
323
|
+
}
|
|
324
|
+
console.error(`File write failed: ${err.message}`);
|
|
325
|
+
process.exit(1);
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
const request = https.get(url, (response) => {
|
|
330
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
331
|
+
// Follow redirect
|
|
332
|
+
response.destroy();
|
|
333
|
+
const redirectRequest = https.get(response.headers.location, handleResponse);
|
|
334
|
+
redirectRequest.on('error', (err) => {
|
|
335
|
+
if (fs.existsSync(dest)) {
|
|
336
|
+
fs.unlinkSync(dest);
|
|
337
|
+
}
|
|
338
|
+
console.error(`Download failed: ${err.message}`);
|
|
339
|
+
process.exit(1);
|
|
340
|
+
});
|
|
341
|
+
} else {
|
|
342
|
+
handleResponse(response);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
request.on('error', (err) => {
|
|
347
|
+
if (fs.existsSync(dest)) {
|
|
348
|
+
fs.unlinkSync(dest);
|
|
349
|
+
}
|
|
350
|
+
console.error(`Download failed: ${err.message}`);
|
|
351
|
+
process.exit(1);
|
|
352
|
+
});
|
|
353
|
+
}
|
|
@@ -258,7 +258,7 @@ SourceDebugLocation getRepresentativeLocationInBlockBody(
|
|
|
258
258
|
Block* blockBody,
|
|
259
259
|
const std::unordered_map<wasm::Expression*, std::optional<wasm::Function::DebugLocation>> debugLocations
|
|
260
260
|
) {
|
|
261
|
-
SourceDebugLocation repLoc = { exists
|
|
261
|
+
SourceDebugLocation repLoc = { .exists = false, .fileIndex = 0, .lineNumber = 0, .columnNumber = 0 };
|
|
262
262
|
|
|
263
263
|
if (DEBUG) {
|
|
264
264
|
std::cout << LOG_PREFIX << " - Checking func Block body: " << blockBody->list.size() << " body expressions" << std::endl;
|
|
@@ -296,7 +296,7 @@ SourceDebugLocation getRepresentativeLocationInBlockBody(
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
SourceDebugLocation getRepresentativeLocation(Function* func) {
|
|
299
|
-
SourceDebugLocation repLoc = { exists
|
|
299
|
+
SourceDebugLocation repLoc = { .exists = false, .fileIndex = 0, .lineNumber = 0, .columnNumber = 0 };
|
|
300
300
|
|
|
301
301
|
// Get body expression debug location
|
|
302
302
|
Expression* body = func->body;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pool-runner-init-CEwLyNI3.d.mts","names":[],"sources":["../src/pool/pool-runner-init.ts"],"mappings":";;;;iBAUgB,wBAAA,CAAyB,eAAA,GAAkB,yBAAA,GAA4B,qBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-8KKo9Hbf.d.mts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