isomorfeus-asset-manager 0.12.8 → 0.13.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9aad2a42adfb07c77dfcb9a9d0edba0b2c4021995682c7ba1b6f2787fecfc17
4
- data.tar.gz: ebcf940818d99635b064677677b94a654c0da66cff00473d0ec5c08fe5848a29
3
+ metadata.gz: aca011238408ac3f1a13c4aeae9a32a7897eda12c1680d54773cf8c48b501302
4
+ data.tar.gz: 8fdd2a8f8ffe4d2ee2e2544db17a33b42f83df77498c53898356c5563ae859f1
5
5
  SHA512:
6
- metadata.gz: 9322f29f4d54bd6e5eafb42043c93c1310d047fcac8be51e0611bf774f37bb791ad8ea07ba6568385845226971af41f3ab61e16ae05dbe1607110a4d5e7cb574
7
- data.tar.gz: '08108368629330daa9510ed9902832a73a11b6ff01af5b2f1e8ee0ac7fa3f15483335bd3c4e88d6c5a8edd01611221df99efc0ce9be07b55d408c434993c25a6'
6
+ metadata.gz: fc65d991ab1aa2ddb8da5118cb9d29cb505d9a51f5ec864fb667ec62e288541b1d26898ee549d4d0336bdbb21a67005630bd2220b3d0c6a502dca635645b100c
7
+ data.tar.gz: fd042923175fe0e57bb8bbe455ca3c7d98e3d781a89728f40a91a8eaa1f6d87c4cab0d2450283021403e3ae1642eebe2a81e7afb1b1bfef9c0eb75127c92dba6
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  class AssetManager
3
- VERSION = '0.12.8'
3
+ VERSION = '0.13.3'
4
4
  end
5
5
  end
@@ -4,9 +4,9 @@
4
4
  "requires": true,
5
5
  "packages": {
6
6
  "node_modules/esbuild-wasm": {
7
- "version": "0.12.28",
8
- "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.12.28.tgz",
9
- "integrity": "sha512-SiIIPHyPWaXRQ+IkAHeF5Pd9+n86mPqQG7mZAhGKn7Y6NfPqP1H+svVEG72pN8aoBZKxblB0ah210qQfhbQIfA==",
7
+ "version": "0.13.13",
8
+ "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.13.13.tgz",
9
+ "integrity": "sha512-oy0ULEK7Vjb61nBbvdeuZwuASexHtUJsMK4+Z9ge+O6Oq1nq/yUlpefMXl5LUpgWUQViNCxlEz536xvYIsTO5w==",
10
10
  "bin": {
11
11
  "esbuild": "bin/esbuild"
12
12
  },
@@ -80,5 +80,22 @@ fs.read = function () {
80
80
  return read.apply(this, arguments);
81
81
  };
82
82
 
83
+ // WASM code generated with Go 1.17.2+ will crash when run in a situation with
84
+ // many environment variables: https://github.com/golang/go/issues/49011. An
85
+ // example of this situation is running a Go-compiled WASM executable in GitHub
86
+ // Actions. Work around this by filtering node's copy of environment variables
87
+ // down to only include the environment variables that esbuild currently uses.
88
+ const esbuildUsedEnvVars = [
89
+ 'NO_COLOR',
90
+ 'NODE_PATH',
91
+ 'npm_config_user_agent',
92
+ 'WT_SESSION',
93
+ ]
94
+ for (let key in process.env) {
95
+ if (esbuildUsedEnvVars.indexOf(key) < 0) {
96
+ delete process.env[key]
97
+ }
98
+ }
99
+
83
100
  const argv = ['node', wasm_exec, esbuild_wasm].concat(process.argv.slice(2));
84
101
  wrapper(require, require.main, Object.assign(Object.create(process), { argv }), Object.assign(Object.create(WebAssembly), { instantiate }));
Binary file
@@ -3,69 +3,123 @@ export type Format = 'iife' | 'cjs' | 'esm';
3
3
  export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'default';
4
4
  export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
5
5
  export type Charset = 'ascii' | 'utf8';
6
- export type TreeShaking = true | 'ignore-annotations';
7
6
 
8
7
  interface CommonOptions {
8
+ /** Documentation: https://esbuild.github.io/api/#sourcemap */
9
9
  sourcemap?: boolean | 'inline' | 'external' | 'both';
10
+ /** Documentation: https://esbuild.github.io/api/#legal-comments */
10
11
  legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
12
+ /** Documentation: https://esbuild.github.io/api/#source-root */
11
13
  sourceRoot?: string;
14
+ /** Documentation: https://esbuild.github.io/api/#sources-content */
12
15
  sourcesContent?: boolean;
13
16
 
17
+ /** Documentation: https://esbuild.github.io/api/#format */
14
18
  format?: Format;
19
+ /** Documentation: https://esbuild.github.io/api/#globalName */
15
20
  globalName?: string;
21
+ /** Documentation: https://esbuild.github.io/api/#target */
16
22
  target?: string | string[];
17
23
 
24
+ /** Documentation: https://esbuild.github.io/api/#minify */
18
25
  minify?: boolean;
26
+ /** Documentation: https://esbuild.github.io/api/#minify */
19
27
  minifyWhitespace?: boolean;
28
+ /** Documentation: https://esbuild.github.io/api/#minify */
20
29
  minifyIdentifiers?: boolean;
30
+ /** Documentation: https://esbuild.github.io/api/#minify */
21
31
  minifySyntax?: boolean;
32
+ /** Documentation: https://esbuild.github.io/api/#charset */
22
33
  charset?: Charset;
23
- treeShaking?: TreeShaking;
34
+ /** Documentation: https://esbuild.github.io/api/#tree-shaking */
35
+ treeShaking?: boolean;
36
+ /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
37
+ ignoreAnnotations?: boolean;
24
38
 
39
+ /** Documentation: https://esbuild.github.io/api/#jsx */
25
40
  jsx?: 'transform' | 'preserve';
41
+ /** Documentation: https://esbuild.github.io/api/#jsx-factory */
26
42
  jsxFactory?: string;
43
+ /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
27
44
  jsxFragment?: string;
28
45
 
46
+ /** Documentation: https://esbuild.github.io/api/#define */
29
47
  define?: { [key: string]: string };
48
+ /** Documentation: https://esbuild.github.io/api/#pure */
30
49
  pure?: string[];
50
+ /** Documentation: https://esbuild.github.io/api/#keep-names */
31
51
  keepNames?: boolean;
32
52
 
53
+ /** Documentation: https://esbuild.github.io/api/#color */
33
54
  color?: boolean;
55
+ /** Documentation: https://esbuild.github.io/api/#log-level */
34
56
  logLevel?: LogLevel;
57
+ /** Documentation: https://esbuild.github.io/api/#log-limit */
35
58
  logLimit?: number;
36
59
  }
37
60
 
38
61
  export interface BuildOptions extends CommonOptions {
62
+ /** Documentation: https://esbuild.github.io/api/#bundle */
39
63
  bundle?: boolean;
64
+ /** Documentation: https://esbuild.github.io/api/#splitting */
40
65
  splitting?: boolean;
66
+ /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
41
67
  preserveSymlinks?: boolean;
68
+ /** Documentation: https://esbuild.github.io/api/#outfile */
42
69
  outfile?: string;
70
+ /** Documentation: https://esbuild.github.io/api/#metafile */
43
71
  metafile?: boolean;
72
+ /** Documentation: https://esbuild.github.io/api/#outdir */
44
73
  outdir?: string;
74
+ /** Documentation: https://esbuild.github.io/api/#outbase */
45
75
  outbase?: string;
76
+ /** Documentation: https://esbuild.github.io/api/#platform */
46
77
  platform?: Platform;
78
+ /** Documentation: https://esbuild.github.io/api/#external */
47
79
  external?: string[];
80
+ /** Documentation: https://esbuild.github.io/api/#loader */
48
81
  loader?: { [ext: string]: Loader };
82
+ /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
49
83
  resolveExtensions?: string[];
84
+ /** Documentation: https://esbuild.github.io/api/#mainFields */
50
85
  mainFields?: string[];
86
+ /** Documentation: https://esbuild.github.io/api/#conditions */
51
87
  conditions?: string[];
88
+ /** Documentation: https://esbuild.github.io/api/#write */
52
89
  write?: boolean;
90
+ /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
53
91
  allowOverwrite?: boolean;
92
+ /** Documentation: https://esbuild.github.io/api/#tsconfig */
54
93
  tsconfig?: string;
94
+ /** Documentation: https://esbuild.github.io/api/#out-extension */
55
95
  outExtension?: { [ext: string]: string };
96
+ /** Documentation: https://esbuild.github.io/api/#public-path */
56
97
  publicPath?: string;
98
+ /** Documentation: https://esbuild.github.io/api/#entry-names */
57
99
  entryNames?: string;
100
+ /** Documentation: https://esbuild.github.io/api/#chunk-names */
58
101
  chunkNames?: string;
102
+ /** Documentation: https://esbuild.github.io/api/#asset-names */
59
103
  assetNames?: string;
104
+ /** Documentation: https://esbuild.github.io/api/#inject */
60
105
  inject?: string[];
106
+ /** Documentation: https://esbuild.github.io/api/#banner */
61
107
  banner?: { [type: string]: string };
108
+ /** Documentation: https://esbuild.github.io/api/#footer */
62
109
  footer?: { [type: string]: string };
110
+ /** Documentation: https://esbuild.github.io/api/#incremental */
63
111
  incremental?: boolean;
112
+ /** Documentation: https://esbuild.github.io/api/#entry-points */
64
113
  entryPoints?: string[] | Record<string, string>;
114
+ /** Documentation: https://esbuild.github.io/api/#stdin */
65
115
  stdin?: StdinOptions;
116
+ /** Documentation: https://esbuild.github.io/plugins/ */
66
117
  plugins?: Plugin[];
118
+ /** Documentation: https://esbuild.github.io/api/#working-directory */
67
119
  absWorkingDir?: string;
120
+ /** Documentation: https://esbuild.github.io/api/#node-paths */
68
121
  nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
122
+ /** Documentation: https://esbuild.github.io/api/#watch */
69
123
  watch?: boolean | WatchMode;
70
124
  }
71
125
 
@@ -86,8 +140,10 @@ export interface Message {
86
140
  location: Location | null;
87
141
  notes: Note[];
88
142
 
89
- // Optional user-specified data that is passed through unmodified. You can
90
- // use this to stash the original error, for example.
143
+ /**
144
+ * Optional user-specified data that is passed through unmodified. You can
145
+ * use this to stash the original error, for example.
146
+ */
91
147
  detail: any;
92
148
  }
93
149
 
@@ -99,17 +155,22 @@ export interface Note {
99
155
  export interface Location {
100
156
  file: string;
101
157
  namespace: string;
102
- line: number; // 1-based
103
- column: number; // 0-based, in bytes
104
- length: number; // in bytes
158
+ /** 1-based */
159
+ line: number;
160
+ /** 0-based, in bytes */
161
+ column: number;
162
+ /** in bytes */
163
+ length: number;
105
164
  lineText: string;
106
165
  suggestion: string;
107
166
  }
108
167
 
109
168
  export interface OutputFile {
110
169
  path: string;
111
- contents: Uint8Array; // "text" as bytes
112
- text: string; // "contents" as text
170
+ /** "text" as bytes */
171
+ contents: Uint8Array;
172
+ /** "contents" as text */
173
+ text: string;
113
174
  }
114
175
 
115
176
  export interface BuildInvalidate {
@@ -124,10 +185,14 @@ export interface BuildIncremental extends BuildResult {
124
185
  export interface BuildResult {
125
186
  errors: Message[];
126
187
  warnings: Message[];
127
- outputFiles?: OutputFile[]; // Only when "write: false"
128
- rebuild?: BuildInvalidate; // Only when "incremental: true"
129
- stop?: () => void; // Only when "watch: true"
130
- metafile?: Metafile; // Only when "metafile: true"
188
+ /** Only when "write: false" */
189
+ outputFiles?: OutputFile[];
190
+ /** Only when "incremental: true" */
191
+ rebuild?: BuildInvalidate;
192
+ /** Only when "watch: true" */
193
+ stop?: () => void;
194
+ /** Only when "metafile: true" */
195
+ metafile?: Metafile;
131
196
  }
132
197
 
133
198
  export interface BuildFailure extends Error {
@@ -135,6 +200,7 @@ export interface BuildFailure extends Error {
135
200
  warnings: Message[];
136
201
  }
137
202
 
203
+ /** Documentation: https://esbuild.github.io/api/#serve-arguments */
138
204
  export interface ServeOptions {
139
205
  port?: number;
140
206
  host?: string;
@@ -147,9 +213,11 @@ export interface ServeOnRequestArgs {
147
213
  method: string;
148
214
  path: string;
149
215
  status: number;
150
- timeInMS: number; // The time to generate the response, not to send it
216
+ /** The time to generate the response, not to send it */
217
+ timeInMS: number;
151
218
  }
152
219
 
220
+ /** Documentation: https://esbuild.github.io/api/#serve-return-values */
153
221
  export interface ServeResult {
154
222
  port: number;
155
223
  host: string;
@@ -327,89 +395,129 @@ export interface AnalyzeMetafileOptions {
327
395
  verbose?: boolean;
328
396
  }
329
397
 
330
- // This function invokes the "esbuild" command-line tool for you. It returns a
331
- // promise that either resolves with a "BuildResult" object or rejects with a
332
- // "BuildFailure" object.
333
- //
334
- // Works in node: yes
335
- // Works in browser: yes
398
+ /**
399
+ * This function invokes the "esbuild" command-line tool for you. It returns a
400
+ * promise that either resolves with a "BuildResult" object or rejects with a
401
+ * "BuildFailure" object.
402
+ *
403
+ * - Works in node: yes
404
+ * - Works in browser: yes
405
+ *
406
+ * Documentation: https://esbuild.github.io/api/#build-api
407
+ */
336
408
  export declare function build(options: BuildOptions & { write: false }): Promise<BuildResult & { outputFiles: OutputFile[] }>;
337
409
  export declare function build(options: BuildOptions & { incremental: true }): Promise<BuildIncremental>;
338
410
  export declare function build(options: BuildOptions): Promise<BuildResult>;
339
411
 
340
- // This function is similar to "build" but it serves the resulting files over
341
- // HTTP on a localhost address with the specified port.
342
- //
343
- // Works in node: yes
344
- // Works in browser: no
412
+ /**
413
+ * This function is similar to "build" but it serves the resulting files over
414
+ * HTTP on a localhost address with the specified port.
415
+ *
416
+ * - Works in node: yes
417
+ * - Works in browser: no
418
+ *
419
+ * Documentation: https://esbuild.github.io/api/#serve
420
+ */
345
421
  export declare function serve(serveOptions: ServeOptions, buildOptions: BuildOptions): Promise<ServeResult>;
346
422
 
347
- // This function transforms a single JavaScript file. It can be used to minify
348
- // JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
349
- // to older JavaScript. It returns a promise that is either resolved with a
350
- // "TransformResult" object or rejected with a "TransformFailure" object.
351
- //
352
- // Works in node: yes
353
- // Works in browser: yes
423
+ /**
424
+ * This function transforms a single JavaScript file. It can be used to minify
425
+ * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
426
+ * to older JavaScript. It returns a promise that is either resolved with a
427
+ * "TransformResult" object or rejected with a "TransformFailure" object.
428
+ *
429
+ * - Works in node: yes
430
+ * - Works in browser: yes
431
+ *
432
+ * Documentation: https://esbuild.github.io/api/#transform-api
433
+ */
354
434
  export declare function transform(input: string, options?: TransformOptions): Promise<TransformResult>;
355
435
 
356
- // Converts log messages to formatted message strings suitable for printing in
357
- // the terminal. This allows you to reuse the built-in behavior of esbuild's
358
- // log message formatter. This is a batch-oriented API for efficiency.
359
- //
360
- // Works in node: yes
361
- // Works in browser: yes
436
+ /**
437
+ * Converts log messages to formatted message strings suitable for printing in
438
+ * the terminal. This allows you to reuse the built-in behavior of esbuild's
439
+ * log message formatter. This is a batch-oriented API for efficiency.
440
+ *
441
+ * - Works in node: yes
442
+ * - Works in browser: yes
443
+ */
362
444
  export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>;
363
445
 
364
- // Pretty-prints an analysis of the metafile JSON to a string. This is just for
365
- // convenience to be able to match esbuild's pretty-printing exactly. If you want
366
- // to customize it, you can just inspect the data in the metafile yourself.
367
- //
368
- // Works in node: yes
369
- // Works in browser: yes
446
+ /**
447
+ * Pretty-prints an analysis of the metafile JSON to a string. This is just for
448
+ * convenience to be able to match esbuild's pretty-printing exactly. If you want
449
+ * to customize it, you can just inspect the data in the metafile yourself.
450
+ *
451
+ * - Works in node: yes
452
+ * - Works in browser: yes
453
+ *
454
+ * Documentation: https://esbuild.github.io/api/#analyze
455
+ */
370
456
  export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>;
371
457
 
372
- // A synchronous version of "build".
373
- //
374
- // Works in node: yes
375
- // Works in browser: no
458
+ /**
459
+ * A synchronous version of "build".
460
+ *
461
+ * - Works in node: yes
462
+ * - Works in browser: no
463
+ *
464
+ * Documentation: https://esbuild.github.io/api/#build-api
465
+ */
376
466
  export declare function buildSync(options: BuildOptions & { write: false }): BuildResult & { outputFiles: OutputFile[] };
377
467
  export declare function buildSync(options: BuildOptions): BuildResult;
378
468
 
379
- // A synchronous version of "transform".
380
- //
381
- // Works in node: yes
382
- // Works in browser: no
469
+ /**
470
+ * A synchronous version of "transform".
471
+ *
472
+ * - Works in node: yes
473
+ * - Works in browser: no
474
+ *
475
+ * Documentation: https://esbuild.github.io/api/#transform-api
476
+ */
383
477
  export declare function transformSync(input: string, options?: TransformOptions): TransformResult;
384
478
 
385
- // A synchronous version of "formatMessages".
386
- //
387
- // Works in node: yes
388
- // Works in browser: no
479
+ /**
480
+ * A synchronous version of "formatMessages".
481
+ *
482
+ * - Works in node: yes
483
+ * - Works in browser: no
484
+ */
389
485
  export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[];
390
486
 
391
- // A synchronous version of "analyzeMetafile".
392
- //
393
- // Works in node: yes
394
- // Works in browser: no
487
+ /**
488
+ * A synchronous version of "analyzeMetafile".
489
+ *
490
+ * - Works in node: yes
491
+ * - Works in browser: no
492
+ *
493
+ * Documentation: https://esbuild.github.io/api/#analyze
494
+ */
395
495
  export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string;
396
496
 
397
- // This configures the browser-based version of esbuild. It is necessary to
398
- // call this first and wait for the returned promise to be resolved before
399
- // making other API calls when using esbuild in the browser.
400
- //
401
- // Works in node: yes
402
- // Works in browser: yes ("options" is required)
497
+ /**
498
+ * This configures the browser-based version of esbuild. It is necessary to
499
+ * call this first and wait for the returned promise to be resolved before
500
+ * making other API calls when using esbuild in the browser.
501
+ *
502
+ * - Works in node: yes
503
+ * - Works in browser: yes ("options" is required)
504
+ *
505
+ * Documentation: https://esbuild.github.io/api/#running-in-the-browser
506
+ */
403
507
  export declare function initialize(options: InitializeOptions): Promise<void>;
404
508
 
405
509
  export interface InitializeOptions {
406
- // The URL of the "esbuild.wasm" file. This must be provided when running
407
- // esbuild in the browser.
510
+ /**
511
+ * The URL of the "esbuild.wasm" file. This must be provided when running
512
+ * esbuild in the browser.
513
+ */
408
514
  wasmURL?: string
409
515
 
410
- // By default esbuild runs the WebAssembly-based browser API in a web worker
411
- // to avoid blocking the UI thread. This can be disabled by setting "worker"
412
- // to false.
516
+ /**
517
+ * By default esbuild runs the WebAssembly-based browser API in a web worker
518
+ * to avoid blocking the UI thread. This can be disabled by setting "worker"
519
+ * to false.
520
+ */
413
521
  worker?: boolean
414
522
  }
415
523
 
@@ -17,9 +17,6 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __require = typeof require !== "undefined" ? require : (x) => {
21
- throw new Error('Dynamic require of "' + x + '" is not supported');
22
- };
23
20
 
24
21
  // lib/shared/stdio_protocol.ts
25
22
  function encodePacket(packet) {
@@ -257,7 +254,8 @@ function pushCommonFlags(flags, options, keys) {
257
254
  let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
258
255
  let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
259
256
  let charset = getFlag(options, keys, "charset", mustBeString);
260
- let treeShaking = getFlag(options, keys, "treeShaking", mustBeStringOrBoolean);
257
+ let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
258
+ let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
261
259
  let jsx = getFlag(options, keys, "jsx", mustBeString);
262
260
  let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
263
261
  let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
@@ -290,8 +288,10 @@ function pushCommonFlags(flags, options, keys) {
290
288
  flags.push("--minify-identifiers");
291
289
  if (charset)
292
290
  flags.push(`--charset=${charset}`);
293
- if (treeShaking !== void 0 && treeShaking !== true)
291
+ if (treeShaking !== void 0)
294
292
  flags.push(`--tree-shaking=${treeShaking}`);
293
+ if (ignoreAnnotations)
294
+ flags.push(`--ignore-annotations`);
295
295
  if (jsx)
296
296
  flags.push(`--jsx=${jsx}`);
297
297
  if (jsxFactory)
@@ -673,8 +673,8 @@ function createChannel(streamIn) {
673
673
  if (isFirstPacket) {
674
674
  isFirstPacket = false;
675
675
  let binaryVersion = String.fromCharCode(...bytes);
676
- if (binaryVersion !== "0.12.28") {
677
- throw new Error(`Cannot start service: Host version "${"0.12.28"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
676
+ if (binaryVersion !== "0.13.13") {
677
+ throw new Error(`Cannot start service: Host version "${"0.13.13"}" does not match binary version ${JSON.stringify(binaryVersion)}`);
678
678
  }
679
679
  return;
680
680
  }
@@ -1546,7 +1546,7 @@ function convertOutputFiles({ path, contents }) {
1546
1546
  }
1547
1547
 
1548
1548
  // lib/npm/browser.ts
1549
- var version = "0.12.28";
1549
+ var version = "0.13.13";
1550
1550
  var build = (options) => ensureServiceIsRunning().build(options);
1551
1551
  var serve = () => {
1552
1552
  throw new Error(`The "serve" API only works in node`);
@@ -2189,6 +2189,13 @@ var startRunningService = async (wasmURL, useWorker) => {
2189
2189
  offset += 8;
2190
2190
  });
2191
2191
 
2192
+ // The linker guarantees global data starts from at least wasmMinDataAddr.
2193
+ // Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr.
2194
+ const wasmMinDataAddr = 4096 + 4096;
2195
+ if (offset >= wasmMinDataAddr) {
2196
+ throw new Error("command line too long");
2197
+ }
2198
+
2192
2199
  this._inst.exports.run(argc, argv);
2193
2200
  if (this.exited) {
2194
2201
  this._resolveExitPromise();
@@ -2296,7 +2303,7 @@ onmessage = ({ data: wasm }) => {
2296
2303
  callback(null, count);
2297
2304
  };
2298
2305
  let go = new global.Go();
2299
- go.argv = ["", \`--service=\${"0.12.28"}\`];
2306
+ go.argv = ["", \`--service=\${"0.13.13"}\`];
2300
2307
  WebAssembly.instantiate(wasm, go.importObject).then(({ instance }) => go.run(instance));
2301
2308
  };}`;
2302
2309
  let worker;