isomorfeus-asset-manager 0.15.10 → 0.16.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.
- checksums.yaml +4 -4
- data/lib/isomorfeus/asset_manager/version.rb +1 -1
- data/node_modules/.package-lock.json +3 -3
- data/node_modules/esbuild-wasm/bin/esbuild +0 -42
- data/node_modules/esbuild-wasm/esbuild.wasm +0 -0
- data/node_modules/esbuild-wasm/esm/browser.d.ts +5 -3
- data/node_modules/esbuild-wasm/esm/browser.js +127 -79
- data/node_modules/esbuild-wasm/esm/browser.min.js +15 -10
- data/node_modules/esbuild-wasm/lib/browser.d.ts +5 -3
- data/node_modules/esbuild-wasm/lib/browser.js +130 -80
- data/node_modules/esbuild-wasm/lib/browser.min.js +17 -12
- data/node_modules/esbuild-wasm/lib/main.d.ts +5 -3
- data/node_modules/esbuild-wasm/lib/main.js +73 -48
- data/node_modules/esbuild-wasm/package.json +1 -1
- data/package.json +1 -1
- metadata +2 -3
- data/node_modules/esbuild-wasm/exit0.js +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 259297a0a8596e22a40abe444ebdde38a92640fbee24efc41f5eea1a1eaa9d95
|
4
|
+
data.tar.gz: b3b2f288e4839ce833cda73758e0b61e99b236a64b8b1cd23b944bfaa1b1f8f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c39718827df12f4c6fe92740be749699534a0766a27295bc15bec759fd5789bc635e4c7c970d6b5e2ffc96bb8ae9dc6f26118cfde9601cb87ea325749bf4c5
|
7
|
+
data.tar.gz: 3753cc6666a0732f0bbcc38ca47902b9013c22094bfd5a23cbcd12444b425ed81d3e2607c82e926d08c20d3616510511ec48647e06f930dd089a73c4da4f4ff2
|
@@ -4,9 +4,9 @@
|
|
4
4
|
"requires": true,
|
5
5
|
"packages": {
|
6
6
|
"node_modules/esbuild-wasm": {
|
7
|
-
"version": "0.
|
8
|
-
"resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.
|
9
|
-
"integrity": "sha512-
|
7
|
+
"version": "0.16.1",
|
8
|
+
"resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.16.1.tgz",
|
9
|
+
"integrity": "sha512-Sf1IJNwserrnFLO7SEdo83BIq3QAml6omLxKl5tP1tB1KgHLRaDdEyr+JxKGCmymSTVU7e5msbR9OrrrZkTENQ==",
|
10
10
|
"bin": {
|
11
11
|
"esbuild": "bin/esbuild"
|
12
12
|
},
|
@@ -3,11 +3,8 @@
|
|
3
3
|
// Forward to the automatically-generated WebAssembly loader from the Go compiler
|
4
4
|
|
5
5
|
const module_ = require('module');
|
6
|
-
const crypto = require('crypto');
|
7
6
|
const path = require('path');
|
8
|
-
const zlib = require('zlib');
|
9
7
|
const fs = require('fs');
|
10
|
-
const os = require('os');
|
11
8
|
|
12
9
|
const wasm_exec_node = path.join(__dirname, '..', 'wasm_exec_node.js');
|
13
10
|
const esbuild_wasm = path.join(__dirname, '..', 'esbuild.wasm');
|
@@ -23,45 +20,6 @@ function instantiate(bytes, importObject) {
|
|
23
20
|
return Promise.resolve({ instance, module });
|
24
21
|
}
|
25
22
|
|
26
|
-
// Node has an unfortunate bug where the node process is unnecessarily kept open while a
|
27
|
-
// WebAssembly module is being optimized: https://github.com/nodejs/node/issues/36616.
|
28
|
-
// This means cases where running "esbuild" should take a few milliseconds can end up
|
29
|
-
// taking many seconds instead. To work around this bug, it is possible to force node to
|
30
|
-
// exit by calling the operating system's exit function. That's what this code does.
|
31
|
-
process.on('exit', code => {
|
32
|
-
// If it's a non-zero exit code, we can just kill our own process to stop. This will
|
33
|
-
// preserve the fact that there is a non-zero exit code although the exit code will
|
34
|
-
// be different. We cannot use this if the exit code is supposed to be zero.
|
35
|
-
if (code !== 0) {
|
36
|
-
try {
|
37
|
-
process.kill(process.pid, 'SIGINT');
|
38
|
-
} catch (e) {
|
39
|
-
}
|
40
|
-
return;
|
41
|
-
}
|
42
|
-
|
43
|
-
// Otherwise if the exit code is zero, try to fall back to a binary N-API module that
|
44
|
-
// calls the operating system's "exit(0)" function.
|
45
|
-
const nativeModule = `${process.platform}-${os.arch()}-${os.endianness()}.node`;
|
46
|
-
const base64 = require('../exit0')[nativeModule];
|
47
|
-
if (base64) {
|
48
|
-
try {
|
49
|
-
const data = zlib.inflateRawSync(Buffer.from(base64, 'base64'));
|
50
|
-
const hash = crypto.createHash('sha256').update(base64).digest().toString('hex').slice(0, 16);
|
51
|
-
const tempFile = path.join(os.tmpdir(), `${hash}-${nativeModule}`);
|
52
|
-
try {
|
53
|
-
if (fs.readFileSync(tempFile).equals(data)) {
|
54
|
-
require(tempFile);
|
55
|
-
}
|
56
|
-
} finally {
|
57
|
-
fs.writeFileSync(tempFile, data);
|
58
|
-
require(tempFile);
|
59
|
-
}
|
60
|
-
} catch (e) {
|
61
|
-
}
|
62
|
-
}
|
63
|
-
});
|
64
|
-
|
65
23
|
// Node has another bug where using "fs.read" to read from stdin reads
|
66
24
|
// everything successfully and then throws an error, but only on Windows. Go's
|
67
25
|
// WebAssembly support uses "fs.read" so it hits this problem. This is a patch
|
Binary file
|
@@ -98,6 +98,8 @@ export interface BuildOptions extends CommonOptions {
|
|
98
98
|
outbase?: string;
|
99
99
|
/** Documentation: https://esbuild.github.io/api/#external */
|
100
100
|
external?: string[];
|
101
|
+
/** Documentation: https://esbuild.github.io/api/#alias */
|
102
|
+
alias?: Record<string, string>;
|
101
103
|
/** Documentation: https://esbuild.github.io/api/#loader */
|
102
104
|
loader?: { [ext: string]: Loader };
|
103
105
|
/** Documentation: https://esbuild.github.io/api/#resolve-extensions */
|
@@ -191,8 +193,8 @@ export interface OutputFile {
|
|
191
193
|
path: string;
|
192
194
|
/** "text" as bytes */
|
193
195
|
contents: Uint8Array;
|
194
|
-
/** "contents" as text */
|
195
|
-
text: string;
|
196
|
+
/** "contents" as text (changes automatically with "contents") */
|
197
|
+
get text(): string;
|
196
198
|
}
|
197
199
|
|
198
200
|
export interface BuildInvalidate {
|
@@ -586,7 +588,7 @@ export interface InitializeOptions {
|
|
586
588
|
* The URL of the "esbuild.wasm" file. This must be provided when running
|
587
589
|
* esbuild in the browser.
|
588
590
|
*/
|
589
|
-
wasmURL?: string
|
591
|
+
wasmURL?: string | URL
|
590
592
|
|
591
593
|
/**
|
592
594
|
* The result of calling "new WebAssembly.Module(buffer)" where "buffer"
|