@srcmap/remapping-wasm 0.1.2 → 0.2.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 ADDED
@@ -0,0 +1,99 @@
1
+ # @srcmap/remapping-wasm
2
+
3
+ [![npm](https://img.shields.io/npm/v/@srcmap/remapping-wasm.svg)](https://www.npmjs.com/package/@srcmap/remapping-wasm)
4
+ [![CI](https://github.com/BartWaardenburg/srcmap/actions/workflows/ci.yml/badge.svg)](https://github.com/BartWaardenburg/srcmap/actions/workflows/ci.yml)
5
+
6
+ High-performance source map concatenation and composition powered by Rust via WebAssembly.
7
+
8
+ **Concatenation** merges source maps from multiple bundled files into one, adjusting line offsets. **Composition** chains source maps through multiple transforms (e.g. TS -> JS -> minified) into a single map pointing to original sources. Alternative to [`@ampproject/remapping`](https://github.com/nicolo-ribaudo/source-map-js).
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @srcmap/remapping-wasm
14
+ ```
15
+
16
+ Works in Node.js, browsers, and any WebAssembly-capable runtime. No native compilation required.
17
+
18
+ ## Usage
19
+
20
+ ### Concatenation
21
+
22
+ Merge source maps from multiple files into a single combined map:
23
+
24
+ ```js
25
+ import { ConcatBuilder } from '@srcmap/remapping-wasm'
26
+
27
+ const builder = new ConcatBuilder('bundle.js')
28
+
29
+ // Add source maps with their line offsets in the output
30
+ builder.addMap(chunkASourceMapJson, 0) // chunk A starts at line 0
31
+ builder.addMap(chunkBSourceMapJson, 1000) // chunk B starts at line 1000
32
+
33
+ const combinedJson = builder.toJSON()
34
+ ```
35
+
36
+ ### Composition / Remapping
37
+
38
+ Chain source maps through a transform pipeline into a single map:
39
+
40
+ ```js
41
+ import { remap } from '@srcmap/remapping-wasm'
42
+
43
+ // Your build: original.ts -> intermediate.js -> minified.js
44
+ // You have: minified.js.map (outer) and intermediate.js.map (inner)
45
+
46
+ const composedJson = remap(minifiedSourceMapJson, (source) => {
47
+ // Called for each source in the outer map
48
+ if (source === 'intermediate.js') {
49
+ return intermediateSourceMapJson // upstream source map JSON
50
+ }
51
+ return null // no upstream map, keep as-is
52
+ })
53
+ ```
54
+
55
+ ## API
56
+
57
+ ### `new ConcatBuilder(file?: string)`
58
+
59
+ Create a builder for concatenating source maps.
60
+
61
+ | Method | Returns | Description |
62
+ |--------|---------|-------------|
63
+ | `addMap(json, lineOffset)` | `void` | Add a source map JSON at the given line offset |
64
+ | `toJSON()` | `string` | Generate the concatenated source map JSON |
65
+
66
+ ### `remap(outerJson, loader)`
67
+
68
+ Compose source maps through a transform chain.
69
+
70
+ | Parameter | Type | Description |
71
+ |-----------|------|-------------|
72
+ | `outerJson` | `string` | The final-stage source map JSON |
73
+ | `loader` | `(source: string) => string \| null` | Returns upstream source map JSON, or `null` |
74
+
75
+ Returns the composed source map as a JSON string.
76
+
77
+ ## Build targets
78
+
79
+ ```bash
80
+ # Node.js (default)
81
+ npm run build
82
+
83
+ # Browser (ES module + .wasm)
84
+ npm run build:web
85
+
86
+ # Bundler (e.g. webpack, vite)
87
+ npm run build:bundler
88
+ ```
89
+
90
+ ## Part of [srcmap](https://github.com/BartWaardenburg/srcmap)
91
+
92
+ High-performance source map tooling written in Rust. See also:
93
+ - [`@srcmap/sourcemap-wasm`](https://www.npmjs.com/package/@srcmap/sourcemap-wasm) - Source map parser (WASM)
94
+ - [`@srcmap/generator-wasm`](https://www.npmjs.com/package/@srcmap/generator-wasm) - Source map generator (WASM)
95
+ - [`@srcmap/symbolicate-wasm`](https://www.npmjs.com/package/@srcmap/symbolicate-wasm) - Stack trace symbolication (WASM)
96
+
97
+ ## License
98
+
99
+ MIT
package/package.json CHANGED
@@ -1,24 +1,35 @@
1
1
  {
2
2
  "name": "@srcmap/remapping-wasm",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "High-performance source map concatenation and remapping powered by Rust (WebAssembly)",
5
5
  "type": "module",
6
6
  "main": "pkg/srcmap_remapping_wasm.js",
7
7
  "types": "pkg/srcmap_remapping_wasm.d.ts",
8
+ "browser": "web/srcmap_remapping_wasm.js",
9
+ "module": "web/srcmap_remapping_wasm.js",
10
+ "exports": {
11
+ ".": {
12
+ "node": "./pkg/srcmap_remapping_wasm.js",
13
+ "browser": "./web/srcmap_remapping_wasm.js",
14
+ "default": "./pkg/srcmap_remapping_wasm.js"
15
+ }
16
+ },
8
17
  "license": "MIT",
9
18
  "files": [
10
19
  "pkg/",
20
+ "web/",
11
21
  "README.md"
12
22
  ],
13
23
  "scripts": {
14
- "build": "wasm-pack build --target nodejs",
15
- "build:web": "wasm-pack build --target web",
16
- "build:bundler": "wasm-pack build --target bundler",
24
+ "build": "wasm-pack build --target nodejs --out-dir pkg",
25
+ "build:web": "wasm-pack build --target web --out-dir web",
26
+ "build:bundler": "wasm-pack build --target bundler --out-dir bundler",
27
+ "build:all": "npm run build && npm run build:web",
17
28
  "test": "node --test __tests__/remapping-wasm.test.mjs"
18
29
  },
19
30
  "repository": {
20
31
  "type": "git",
21
- "url": "https://github.com/BartWaardenburg/srcmap"
32
+ "url": "git+https://github.com/BartWaardenburg/srcmap.git"
22
33
  },
23
34
  "keywords": [
24
35
  "sourcemap",
@@ -29,6 +40,7 @@
29
40
  "rust",
30
41
  "wasm",
31
42
  "webassembly",
32
- "performance"
43
+ "performance",
44
+ "browser"
33
45
  ]
34
46
  }
package/pkg/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # @srcmap/remapping-wasm
2
+
3
+ [![npm](https://img.shields.io/npm/v/@srcmap/remapping-wasm.svg)](https://www.npmjs.com/package/@srcmap/remapping-wasm)
4
+ [![CI](https://github.com/BartWaardenburg/srcmap/actions/workflows/ci.yml/badge.svg)](https://github.com/BartWaardenburg/srcmap/actions/workflows/ci.yml)
5
+
6
+ High-performance source map concatenation and composition powered by Rust via WebAssembly.
7
+
8
+ **Concatenation** merges source maps from multiple bundled files into one, adjusting line offsets. **Composition** chains source maps through multiple transforms (e.g. TS -> JS -> minified) into a single map pointing to original sources. Alternative to [`@ampproject/remapping`](https://github.com/nicolo-ribaudo/source-map-js).
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @srcmap/remapping-wasm
14
+ ```
15
+
16
+ Works in Node.js, browsers, and any WebAssembly-capable runtime. No native compilation required.
17
+
18
+ ## Usage
19
+
20
+ ### Concatenation
21
+
22
+ Merge source maps from multiple files into a single combined map:
23
+
24
+ ```js
25
+ import { ConcatBuilder } from '@srcmap/remapping-wasm'
26
+
27
+ const builder = new ConcatBuilder('bundle.js')
28
+
29
+ // Add source maps with their line offsets in the output
30
+ builder.addMap(chunkASourceMapJson, 0) // chunk A starts at line 0
31
+ builder.addMap(chunkBSourceMapJson, 1000) // chunk B starts at line 1000
32
+
33
+ const combinedJson = builder.toJSON()
34
+ ```
35
+
36
+ ### Composition / Remapping
37
+
38
+ Chain source maps through a transform pipeline into a single map:
39
+
40
+ ```js
41
+ import { remap } from '@srcmap/remapping-wasm'
42
+
43
+ // Your build: original.ts -> intermediate.js -> minified.js
44
+ // You have: minified.js.map (outer) and intermediate.js.map (inner)
45
+
46
+ const composedJson = remap(minifiedSourceMapJson, (source) => {
47
+ // Called for each source in the outer map
48
+ if (source === 'intermediate.js') {
49
+ return intermediateSourceMapJson // upstream source map JSON
50
+ }
51
+ return null // no upstream map, keep as-is
52
+ })
53
+ ```
54
+
55
+ ## API
56
+
57
+ ### `new ConcatBuilder(file?: string)`
58
+
59
+ Create a builder for concatenating source maps.
60
+
61
+ | Method | Returns | Description |
62
+ |--------|---------|-------------|
63
+ | `addMap(json, lineOffset)` | `void` | Add a source map JSON at the given line offset |
64
+ | `toJSON()` | `string` | Generate the concatenated source map JSON |
65
+
66
+ ### `remap(outerJson, loader)`
67
+
68
+ Compose source maps through a transform chain.
69
+
70
+ | Parameter | Type | Description |
71
+ |-----------|------|-------------|
72
+ | `outerJson` | `string` | The final-stage source map JSON |
73
+ | `loader` | `(source: string) => string \| null` | Returns upstream source map JSON, or `null` |
74
+
75
+ Returns the composed source map as a JSON string.
76
+
77
+ ## Build targets
78
+
79
+ ```bash
80
+ # Node.js (default)
81
+ npm run build
82
+
83
+ # Browser (ES module + .wasm)
84
+ npm run build:web
85
+
86
+ # Bundler (e.g. webpack, vite)
87
+ npm run build:bundler
88
+ ```
89
+
90
+ ## Part of [srcmap](https://github.com/BartWaardenburg/srcmap)
91
+
92
+ High-performance source map tooling written in Rust. See also:
93
+ - [`@srcmap/sourcemap-wasm`](https://www.npmjs.com/package/@srcmap/sourcemap-wasm) - Source map parser (WASM)
94
+ - [`@srcmap/generator-wasm`](https://www.npmjs.com/package/@srcmap/generator-wasm) - Source map generator (WASM)
95
+ - [`@srcmap/symbolicate-wasm`](https://www.npmjs.com/package/@srcmap/symbolicate-wasm) - Stack trace symbolication (WASM)
96
+
97
+ ## License
98
+
99
+ MIT
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "srcmap-remapping-wasm",
3
+ "description": "WebAssembly bindings for srcmap-remapping",
4
+ "version": "0.2.0",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/BartWaardenburg/srcmap"
9
+ },
10
+ "files": [
11
+ "srcmap_remapping_wasm_bg.wasm",
12
+ "srcmap_remapping_wasm.js",
13
+ "srcmap_remapping_wasm.d.ts"
14
+ ],
15
+ "main": "srcmap_remapping_wasm.js",
16
+ "types": "srcmap_remapping_wasm.d.ts"
17
+ }
@@ -0,0 +1,30 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ export class ConcatBuilder {
5
+ free(): void;
6
+ [Symbol.dispose](): void;
7
+ /**
8
+ * Add a source map (as JSON string) at the given line offset.
9
+ */
10
+ addMap(json: string, line_offset: number): void;
11
+ /**
12
+ * Create a new concatenation builder.
13
+ */
14
+ constructor(file?: string | null);
15
+ /**
16
+ * Finish and return the concatenated source map as a JSON string.
17
+ */
18
+ toJSON(): string;
19
+ }
20
+
21
+ /**
22
+ * Compose/remap source maps through a transform chain.
23
+ *
24
+ * `outer_json` is the final-stage source map as a JSON string.
25
+ * `loader` is a function that receives a source filename and should return
26
+ * the upstream source map JSON string, or null/undefined if none.
27
+ *
28
+ * Returns the remapped source map as a JSON string.
29
+ */
30
+ export function remap(outer_json: string, loader: Function): string;
@@ -0,0 +1,290 @@
1
+ /* @ts-self-types="./srcmap_remapping_wasm.d.ts" */
2
+
3
+ class ConcatBuilder {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ ConcatBuilderFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_concatbuilder_free(ptr, 0);
13
+ }
14
+ /**
15
+ * Add a source map (as JSON string) at the given line offset.
16
+ * @param {string} json
17
+ * @param {number} line_offset
18
+ */
19
+ addMap(json, line_offset) {
20
+ try {
21
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
22
+ const ptr0 = passStringToWasm0(json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
23
+ const len0 = WASM_VECTOR_LEN;
24
+ wasm.concatbuilder_addMap(retptr, this.__wbg_ptr, ptr0, len0, line_offset);
25
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
26
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
27
+ if (r1) {
28
+ throw takeObject(r0);
29
+ }
30
+ } finally {
31
+ wasm.__wbindgen_add_to_stack_pointer(16);
32
+ }
33
+ }
34
+ /**
35
+ * Create a new concatenation builder.
36
+ * @param {string | null} [file]
37
+ */
38
+ constructor(file) {
39
+ var ptr0 = isLikeNone(file) ? 0 : passStringToWasm0(file, wasm.__wbindgen_export, wasm.__wbindgen_export2);
40
+ var len0 = WASM_VECTOR_LEN;
41
+ const ret = wasm.concatbuilder_new(ptr0, len0);
42
+ this.__wbg_ptr = ret >>> 0;
43
+ ConcatBuilderFinalization.register(this, this.__wbg_ptr, this);
44
+ return this;
45
+ }
46
+ /**
47
+ * Finish and return the concatenated source map as a JSON string.
48
+ * @returns {string}
49
+ */
50
+ toJSON() {
51
+ let deferred1_0;
52
+ let deferred1_1;
53
+ try {
54
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
55
+ wasm.concatbuilder_toJSON(retptr, this.__wbg_ptr);
56
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
57
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
58
+ deferred1_0 = r0;
59
+ deferred1_1 = r1;
60
+ return getStringFromWasm0(r0, r1);
61
+ } finally {
62
+ wasm.__wbindgen_add_to_stack_pointer(16);
63
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
64
+ }
65
+ }
66
+ }
67
+ if (Symbol.dispose) ConcatBuilder.prototype[Symbol.dispose] = ConcatBuilder.prototype.free;
68
+ exports.ConcatBuilder = ConcatBuilder;
69
+
70
+ /**
71
+ * Compose/remap source maps through a transform chain.
72
+ *
73
+ * `outer_json` is the final-stage source map as a JSON string.
74
+ * `loader` is a function that receives a source filename and should return
75
+ * the upstream source map JSON string, or null/undefined if none.
76
+ *
77
+ * Returns the remapped source map as a JSON string.
78
+ * @param {string} outer_json
79
+ * @param {Function} loader
80
+ * @returns {string}
81
+ */
82
+ function remap(outer_json, loader) {
83
+ let deferred3_0;
84
+ let deferred3_1;
85
+ try {
86
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
87
+ const ptr0 = passStringToWasm0(outer_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
88
+ const len0 = WASM_VECTOR_LEN;
89
+ wasm.remap(retptr, ptr0, len0, addBorrowedObject(loader));
90
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
91
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
92
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
93
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
94
+ var ptr2 = r0;
95
+ var len2 = r1;
96
+ if (r3) {
97
+ ptr2 = 0; len2 = 0;
98
+ throw takeObject(r2);
99
+ }
100
+ deferred3_0 = ptr2;
101
+ deferred3_1 = len2;
102
+ return getStringFromWasm0(ptr2, len2);
103
+ } finally {
104
+ wasm.__wbindgen_add_to_stack_pointer(16);
105
+ heap[stack_pointer++] = undefined;
106
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
107
+ }
108
+ }
109
+ exports.remap = remap;
110
+
111
+ function __wbg_get_imports() {
112
+ const import0 = {
113
+ __proto__: null,
114
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
115
+ const ret = Error(getStringFromWasm0(arg0, arg1));
116
+ return addHeapObject(ret);
117
+ },
118
+ __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {
119
+ const ret = getObject(arg0) === null;
120
+ return ret;
121
+ },
122
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
123
+ const ret = getObject(arg0) === undefined;
124
+ return ret;
125
+ },
126
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
127
+ const obj = getObject(arg1);
128
+ const ret = typeof(obj) === 'string' ? obj : undefined;
129
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
130
+ var len1 = WASM_VECTOR_LEN;
131
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
132
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
133
+ },
134
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
135
+ throw new Error(getStringFromWasm0(arg0, arg1));
136
+ },
137
+ __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
138
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
139
+ return addHeapObject(ret);
140
+ }, arguments); },
141
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
142
+ // Cast intrinsic for `Ref(String) -> Externref`.
143
+ const ret = getStringFromWasm0(arg0, arg1);
144
+ return addHeapObject(ret);
145
+ },
146
+ __wbindgen_object_drop_ref: function(arg0) {
147
+ takeObject(arg0);
148
+ },
149
+ };
150
+ return {
151
+ __proto__: null,
152
+ "./srcmap_remapping_wasm_bg.js": import0,
153
+ };
154
+ }
155
+
156
+ const ConcatBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
157
+ ? { register: () => {}, unregister: () => {} }
158
+ : new FinalizationRegistry(ptr => wasm.__wbg_concatbuilder_free(ptr >>> 0, 1));
159
+
160
+ function addHeapObject(obj) {
161
+ if (heap_next === heap.length) heap.push(heap.length + 1);
162
+ const idx = heap_next;
163
+ heap_next = heap[idx];
164
+
165
+ heap[idx] = obj;
166
+ return idx;
167
+ }
168
+
169
+ function addBorrowedObject(obj) {
170
+ if (stack_pointer == 1) throw new Error('out of js stack');
171
+ heap[--stack_pointer] = obj;
172
+ return stack_pointer;
173
+ }
174
+
175
+ function dropObject(idx) {
176
+ if (idx < 1028) return;
177
+ heap[idx] = heap_next;
178
+ heap_next = idx;
179
+ }
180
+
181
+ let cachedDataViewMemory0 = null;
182
+ function getDataViewMemory0() {
183
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
184
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
185
+ }
186
+ return cachedDataViewMemory0;
187
+ }
188
+
189
+ function getStringFromWasm0(ptr, len) {
190
+ ptr = ptr >>> 0;
191
+ return decodeText(ptr, len);
192
+ }
193
+
194
+ let cachedUint8ArrayMemory0 = null;
195
+ function getUint8ArrayMemory0() {
196
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
197
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
198
+ }
199
+ return cachedUint8ArrayMemory0;
200
+ }
201
+
202
+ function getObject(idx) { return heap[idx]; }
203
+
204
+ function handleError(f, args) {
205
+ try {
206
+ return f.apply(this, args);
207
+ } catch (e) {
208
+ wasm.__wbindgen_export3(addHeapObject(e));
209
+ }
210
+ }
211
+
212
+ let heap = new Array(1024).fill(undefined);
213
+ heap.push(undefined, null, true, false);
214
+
215
+ let heap_next = heap.length;
216
+
217
+ function isLikeNone(x) {
218
+ return x === undefined || x === null;
219
+ }
220
+
221
+ function passStringToWasm0(arg, malloc, realloc) {
222
+ if (realloc === undefined) {
223
+ const buf = cachedTextEncoder.encode(arg);
224
+ const ptr = malloc(buf.length, 1) >>> 0;
225
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
226
+ WASM_VECTOR_LEN = buf.length;
227
+ return ptr;
228
+ }
229
+
230
+ let len = arg.length;
231
+ let ptr = malloc(len, 1) >>> 0;
232
+
233
+ const mem = getUint8ArrayMemory0();
234
+
235
+ let offset = 0;
236
+
237
+ for (; offset < len; offset++) {
238
+ const code = arg.charCodeAt(offset);
239
+ if (code > 0x7F) break;
240
+ mem[ptr + offset] = code;
241
+ }
242
+ if (offset !== len) {
243
+ if (offset !== 0) {
244
+ arg = arg.slice(offset);
245
+ }
246
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
247
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
248
+ const ret = cachedTextEncoder.encodeInto(arg, view);
249
+
250
+ offset += ret.written;
251
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
252
+ }
253
+
254
+ WASM_VECTOR_LEN = offset;
255
+ return ptr;
256
+ }
257
+
258
+ let stack_pointer = 1024;
259
+
260
+ function takeObject(idx) {
261
+ const ret = getObject(idx);
262
+ dropObject(idx);
263
+ return ret;
264
+ }
265
+
266
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
267
+ cachedTextDecoder.decode();
268
+ function decodeText(ptr, len) {
269
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
270
+ }
271
+
272
+ const cachedTextEncoder = new TextEncoder();
273
+
274
+ if (!('encodeInto' in cachedTextEncoder)) {
275
+ cachedTextEncoder.encodeInto = function (arg, view) {
276
+ const buf = cachedTextEncoder.encode(arg);
277
+ view.set(buf);
278
+ return {
279
+ read: arg.length,
280
+ written: buf.length
281
+ };
282
+ };
283
+ }
284
+
285
+ let WASM_VECTOR_LEN = 0;
286
+
287
+ const wasmPath = `${__dirname}/srcmap_remapping_wasm_bg.wasm`;
288
+ const wasmBytes = require('fs').readFileSync(wasmPath);
289
+ const wasmModule = new WebAssembly.Module(wasmBytes);
290
+ let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
@@ -0,0 +1,13 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_concatbuilder_free: (a: number, b: number) => void;
5
+ export const concatbuilder_addMap: (a: number, b: number, c: number, d: number, e: number) => void;
6
+ export const concatbuilder_new: (a: number, b: number) => number;
7
+ export const concatbuilder_toJSON: (a: number, b: number) => void;
8
+ export const remap: (a: number, b: number, c: number, d: number) => void;
9
+ export const __wbindgen_export: (a: number, b: number) => number;
10
+ export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
11
+ export const __wbindgen_export3: (a: number) => void;
12
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
13
+ export const __wbindgen_export4: (a: number, b: number, c: number) => void;