substrate-lang 0.10.1 → 0.10.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.
Files changed (61) hide show
  1. package/build/compiler/{checker.4dd4556dd421@0+0.wasm → checker.1d67e1d4e91a@0+0.wasm} +0 -0
  2. package/build/compiler/{expander.967ce443d379@0+0.wasm → expander.34110a31a949@0+0.wasm} +0 -0
  3. package/build/compiler/{main.4fc52f204d54@0+0.wasm → main.ca9b5089c24d@0+0.wasm} +0 -0
  4. package/build/compiler/program +4 -4
  5. package/build/compiler/{roots.cefd10e93684@0+0.wasm → roots.2f1ad1a79459@0+0.wasm} +0 -0
  6. package/build/sub/{build.459c5b9412bd@0+0.wasm → build.eef7dfa467ec@0+0.wasm} +0 -0
  7. package/build/sub/{common.1edc613607a0@0+0.wasm → common.7617940db2dc@0+0.wasm} +0 -0
  8. package/build/sub/deflate.23f7c4679260@0+0.wasm +0 -0
  9. package/build/sub/{doc.0775df5de6fe@0+0.wasm → doc.92d6d82d99c1@0+0.wasm} +0 -0
  10. package/build/sub/{doc.ef9965d5d402@0+0.wasm → doc.dab689b811ca@0+0.wasm} +0 -0
  11. package/build/sub/{fetch.96b2d10f025e@0+0.wasm → fetch.3367ff4f88c0@0+0.wasm} +0 -0
  12. package/build/sub/{files.ad0469fdf6fa@0+0.wasm → files.5ae9d3cebeca@0+0.wasm} +0 -0
  13. package/build/sub/gzip.16e372eda1cf@0+0.wasm +0 -0
  14. package/build/sub/{hash.660682e4f491@0+0.wasm → hash.c57c141b4862@0+0.wasm} +0 -0
  15. package/build/sub/{html.a23126eb949a@0+0.wasm → html.803f73c35c4a@0+0.wasm} +0 -0
  16. package/build/sub/{manifest.ef317480deb0@0+0.wasm → manifest.da52a88c7af7@0+0.wasm} +0 -0
  17. package/build/sub/{map.f455cca6a42a@0+0.wasm → map.5c8084999550@0+0.wasm} +0 -0
  18. package/build/sub/program +22 -22
  19. package/build/sub/{root.f10a4906f460@0+0.wasm → root.78253db36643@0+0.wasm} +0 -0
  20. package/build/sub/{roots.cefd10e93684@0+0.wasm → roots.2f1ad1a79459@0+0.wasm} +0 -0
  21. package/build/sub/sha256.a6c32b04d799@0+0.wasm +0 -0
  22. package/build/sub/site.47fd989be8fb@0+0.wasm +0 -0
  23. package/build/sub/site.c908b1f6db12@0+0.wasm +0 -0
  24. package/build/sub/{store.a24d7a25daa6@0+0.wasm → store.048c77bb124d@0+0.wasm} +0 -0
  25. package/build/sub/sub.a618f89f2ec8@0+0.wasm +0 -0
  26. package/build/sub/{test.9bd59c73f65e@0+0.wasm → test.b529bf52ba3e@0+0.wasm} +0 -0
  27. package/build/sub/{text.1bc90482bd43@0+0.wasm → text.b214933a4984@0+0.wasm} +0 -0
  28. package/build/sub/{upgrade.39ee449b00d5@0+0.wasm → upgrade.7ec5651ed2e9@0+0.wasm} +0 -0
  29. package/package.json +1 -1
  30. package/std/http/server.sub +7 -7
  31. package/std/http/static.sub +66 -30
  32. package/std/package/manifest.sub +9 -4
  33. package/std/package/site.sub +209 -15
  34. package/std/package.sub +2 -2
  35. package/std/test/browser.sub +20 -14
  36. package/std/test/build.sub +8 -6
  37. package/std/test/page/agent.mjs +8 -2
  38. package/std/web/canvas.sub +1 -1
  39. package/std/web/dom.sub +5 -5
  40. package/std/web/patches.sub +8 -8
  41. package/substrate/VERSION +1 -1
  42. package/substrate/compiler/expander.sub +2 -3
  43. package/substrate/compiler/roots.sub +12 -5
  44. package/substrate/host/grants.mjs +3 -3
  45. package/substrate/host/node/net.mjs +17 -2
  46. package/substrate/host/node/worker.mjs +3 -1
  47. package/substrate/host/subhost.mjs +4 -1
  48. package/substrate/host/web/audio.mjs +1 -1
  49. package/substrate/host/web/dom.mjs +3 -3
  50. package/substrate/host/web/dom.sub +4 -4
  51. package/substrate/host/web/fs.mjs +3 -3
  52. package/substrate/host/web/gpu.mjs +2 -2
  53. package/substrate/host/web/location.sub +1 -1
  54. package/substrate/host/web/start.mjs +11 -7
  55. package/substrate/host/web/subhost-web.mjs +54 -33
  56. package/substrate/host/web/worker-script.mjs +4 -4
  57. package/substrate/host/web/worker.mjs +4 -4
  58. package/substrate/host/worker.mjs +1 -1
  59. package/build/sub/site.1732b58ec0e8@0+0.wasm +0 -0
  60. package/build/sub/site.ae3913b0b0f4@0+0.wasm +0 -0
  61. package/build/sub/sub.2e3092140706@0+0.wasm +0 -0
@@ -1,9 +1,9 @@
1
- // Runs a worker in a Web Worker. The worker can use its side of the worker module and the page's modules that a
1
+ // Runs a worker in a Web Worker. The worker can use its side of the worker module and the web program's modules that a
2
2
  // worker may have, within its grants, with the fakes it was given in place of the modules they fake. Its files are a
3
- // read-only copy of the page's files.
3
+ // read-only copy of the web program's files.
4
4
  import { run } from './subhost-web.mjs';
5
5
  import { fsModule } from '../fs.mjs';
6
- import { pageFiles, resolvePath } from './fs.mjs';
6
+ import { memoryFiles, resolvePath } from './fs.mjs';
7
7
  import { workerSide } from '../worker-side.mjs';
8
8
 
9
9
  const loaders = {
@@ -51,7 +51,7 @@ self.onmessage = async (e) => {
51
51
  if (m.type === 'start') {
52
52
  if (m.heard) side.limitOutput();
53
53
  const wasm = new Map(m.modules);
54
- const modules = { worker: side.worker, fs: fsModule(readOnly(pageFiles(m.files, m.cwd, m.grants))) };
54
+ const modules = { worker: side.worker, fs: fsModule(readOnly(memoryFiles(m.files, m.cwd, m.grants))) };
55
55
  const absent = new Set();
56
56
  const fakes = await fakesOf(m);
57
57
  for (const name of m.names) {
@@ -1,12 +1,12 @@
1
- // The host module "worker" in a browser. Each worker runs in a Web Worker, which gets a copy of the page's files and
2
- // the fakes the worker's grants ask for.
1
+ // The host module "worker" in a browser. Each worker runs in a Web Worker, which gets a copy of the web program's files
2
+ // and the fakes the worker's grants ask for.
3
3
  import { workerModule } from '../worker.mjs';
4
4
 
5
5
  export function workers() {
6
6
  return workerModule({
7
7
  spawn(plan, app) {
8
- if (plan.tls) throw new Error('worker.start: a page\'s workers cannot have TLS files');
9
- if (plan.ends) throw new Error('worker.start: a page\'s workers do not end on their own');
8
+ if (plan.tls) throw new Error('worker.start: a web program\'s workers cannot have TLS files');
9
+ if (plan.ends) throw new Error('worker.start: a web program\'s workers do not end on their own');
10
10
  const thread = new Worker(new URL('./worker-script.mjs', import.meta.url), { type: 'module' });
11
11
  thread.postMessage({
12
12
  type: 'start',
@@ -86,7 +86,7 @@ export function workerModule({ spawn }) {
86
86
 
87
87
  return (theCaller, app) => {
88
88
  caller = theCaller;
89
- // What workers have been sent and not yet started on, which browser tests wait for as they settle a page.
89
+ // What workers have been sent and not yet started on, which browser tests wait for as they settle a document.
90
90
  if (app && app.realTime) {
91
91
  app.realTime.push({ pending: () => [...alive.values()].reduce((n, x) => n + x.owed, 0), progress: () => started });
92
92
  }
Binary file