toiljs 0.0.16 → 0.0.20

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 (100) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +313 -128
  3. package/as-pect.config.js +1 -1
  4. package/build/backend/.tsbuildinfo +1 -1
  5. package/build/backend/index.d.ts +1 -0
  6. package/build/backend/index.js +20 -1
  7. package/build/cli/.tsbuildinfo +1 -1
  8. package/build/cli/index.js +1320 -697
  9. package/build/client/.tsbuildinfo +1 -1
  10. package/build/client/dev/devtools.js +42 -5
  11. package/build/client/errors.d.ts +1 -0
  12. package/build/client/errors.js +3 -0
  13. package/build/client/index.d.ts +2 -0
  14. package/build/client/index.js +2 -0
  15. package/build/client/rpc.d.ts +1 -0
  16. package/build/client/rpc.js +37 -0
  17. package/build/compiler/.tsbuildinfo +1 -1
  18. package/build/compiler/config.js +3 -1
  19. package/build/compiler/docs.js +69 -7
  20. package/build/compiler/generate.js +5 -4
  21. package/build/compiler/index.d.ts +1 -0
  22. package/build/compiler/index.js +30 -1
  23. package/build/compiler/plugin.js +80 -8
  24. package/build/compiler/seo.js +15 -1
  25. package/build/compiler/ssg.js +7 -1
  26. package/build/compiler/vite.js +25 -0
  27. package/build/io/.tsbuildinfo +1 -1
  28. package/build/io/codec.d.ts +54 -0
  29. package/build/io/codec.js +143 -0
  30. package/build/io/index.d.ts +1 -2
  31. package/build/io/index.js +1 -2
  32. package/eslint.config.js +1 -1
  33. package/examples/basic/client/routes/features/index.tsx +1 -1
  34. package/examples/basic/client/routes/io.tsx +6 -7
  35. package/examples/basic/client/routes/rest.tsx +84 -0
  36. package/examples/basic/client/routes/rpc.tsx +43 -0
  37. package/package.json +19 -7
  38. package/presets/prettier-plugin.js +51 -0
  39. package/presets/prettier.json +1 -0
  40. package/server/runtime/README.md +97 -0
  41. package/server/runtime/abort/abort.ts +27 -0
  42. package/server/runtime/env/Server.ts +61 -0
  43. package/server/runtime/envelope.ts +191 -0
  44. package/server/runtime/exports/index.ts +52 -0
  45. package/server/runtime/handlers/ToilHandler.ts +34 -0
  46. package/server/runtime/index.ts +26 -0
  47. package/server/runtime/lang/Potential.ts +5 -0
  48. package/server/runtime/memory.ts +81 -0
  49. package/server/runtime/request.ts +55 -0
  50. package/server/runtime/response.ts +86 -0
  51. package/server/runtime/rest/Rest.ts +39 -0
  52. package/server/runtime/rest/RestHandler.ts +20 -0
  53. package/server/runtime/rest/RouteContext.ts +82 -0
  54. package/server/runtime/rest/match.ts +48 -0
  55. package/server/runtime/tsconfig.json +7 -0
  56. package/src/backend/index.ts +45 -3
  57. package/src/cli/create.ts +16 -6
  58. package/src/cli/diagnostics.ts +81 -0
  59. package/src/cli/doctor.ts +384 -7
  60. package/src/cli/index.ts +11 -2
  61. package/src/client/dev/devtools.tsx +49 -4
  62. package/src/client/errors.ts +11 -0
  63. package/src/client/index.ts +2 -0
  64. package/src/client/rpc.ts +64 -0
  65. package/src/compiler/config.ts +3 -1
  66. package/src/compiler/docs.ts +69 -7
  67. package/src/compiler/generate.ts +6 -5
  68. package/src/compiler/index.ts +50 -1
  69. package/src/compiler/plugin.ts +99 -11
  70. package/src/compiler/seo.ts +23 -3
  71. package/src/compiler/ssg.ts +10 -1
  72. package/src/compiler/vite.ts +34 -0
  73. package/src/io/FastMap.ts +24 -0
  74. package/src/io/FastSet.ts +15 -1
  75. package/src/io/codec.ts +217 -0
  76. package/src/io/index.ts +1 -2
  77. package/src/io/types.ts +2 -1
  78. package/test/assembly/example.spec.ts +14 -4
  79. package/test/doctor.test.ts +65 -0
  80. package/test/errors.test.ts +21 -0
  81. package/test/io.test.ts +65 -41
  82. package/test/prettier-plugin.test.ts +46 -0
  83. package/test/rpc.test.ts +50 -0
  84. package/tests/data-parity/generated-parity.ts +99 -0
  85. package/tests/data-parity/parity.ts +80 -0
  86. package/tests/data-parity/spec.ts +46 -0
  87. package/tsconfig.json +1 -1
  88. package/tsconfig.server.json +1 -1
  89. package/build/io/BinaryReader.d.ts +0 -44
  90. package/build/io/BinaryReader.js +0 -244
  91. package/build/io/BinaryWriter.d.ts +0 -44
  92. package/build/io/BinaryWriter.js +0 -297
  93. package/build/server/release.wasm +0 -0
  94. package/build/server/release.wat +0 -9
  95. package/src/io/BinaryReader.ts +0 -340
  96. package/src/io/BinaryWriter.ts +0 -385
  97. package/src/server/index.ts +0 -10
  98. package/src/server/main.ts +0 -13
  99. package/src/server/tsconfig.json +0 -4
  100. package/toilconfig.json +0 -30
package/CHANGELOG.md CHANGED
@@ -1,5 +1,133 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.19] - 2026-06-06
4
+
5
+ ### Other Changes
6
+
7
+ - feat(devtools): include the route's source code in AI prompts ([#108](https://github.com/dacely-cloud/toiljs/pull/108)) by @BlobMaster41
8
+ - fix(security): dev-endpoint hardening + full-codebase audit fixes ([#109](https://github.com/dacely-cloud/toiljs/pull/109)) by @BlobMaster41
9
+ - refactor(server): expose runtime as the toiljs/server/runtime library… ([#110](https://github.com/dacely-cloud/toiljs/pull/110)) by @BlobMaster41
10
+ - feat: server/runtime export + typed @data RPC client (Server, codec, doctor) ([#111](https://github.com/dacely-cloud/toiljs/pull/111)) by @BlobMaster41
11
+ - fix(io/cli): codec buffer-growth crash + i256, doctor --fix hardening ([#112](https://github.com/dacely-cloud/toiljs/pull/112)) by @BlobMaster41
12
+ - chore: toiljs 0.0.17 + RPC example demo + toolchain on toilscript 0.1.9 ([#113](https://github.com/dacely-cloud/toiljs/pull/113)) by @BlobMaster41
13
+ - fix(compiler): server-first build order + actionable error for missing shared/server ([#114](https://github.com/dacely-cloud/toiljs/pull/114)) by @BlobMaster41
14
+ - feat: prettier formats toilscript server (plugin) + doctor coverage; toilscript ^0.1.10 ([#115](https://github.com/dacely-cloud/toiljs/pull/115)) by @BlobMaster41
15
+ - feat(rest): @rest/@route HTTP layer + generated Server.REST fetch client ([#116](https://github.com/dacely-cloud/toiljs/pull/116)) by @BlobMaster41
16
+
17
+
18
+
19
+
20
+ ## [v0.0.16] - 2026-06-03
21
+
22
+ ### Other Changes
23
+
24
+ - feat: client/server config split, server rename, enforced client tooling ([#1](https://github.com/dacely-cloud/toiljs/pull/1)) by @BlobMaster41
25
+ - Epic branded CLI + interactive `toiljs create` ([#3](https://github.com/dacely-cloud/toiljs/pull/3)) by @BlobMaster41
26
+ - Client/server config split, src/server rename, enforced client tooling ([#2](https://github.com/dacely-cloud/toiljs/pull/2)) by @BlobMaster41
27
+ - feat: client WebSocket channel for the backend /_toil endpoint ([#7](https://github.com/dacely-cloud/toiljs/pull/7)) by @BlobMaster41
28
+ - feat: native BinaryWriter/BinaryReader + FastMap/FastSet (toiljs/io) ([#6](https://github.com/dacely-cloud/toiljs/pull/6)) by @BlobMaster41
29
+ - chore: remove all references ([#8](https://github.com/dacely-cloud/toiljs/pull/8)) by @BlobMaster41
30
+ - feat: harden the hyper-express backend server ([#9](https://github.com/dacely-cloud/toiljs/pull/9)) by @BlobMaster41
31
+ - feat: catch-all routes + custom 404 page ([#10](https://github.com/dacely-cloud/toiljs/pull/10)) by @BlobMaster41
32
+ - style: drop banner comments (TSDoc only) ([#11](https://github.com/dacely-cloud/toiljs/pull/11)) by @BlobMaster41
33
+ - feat: serve Vite dev through the hyper-express/uWS proxy ([#12](https://github.com/dacely-cloud/toiljs/pull/12)) by @BlobMaster41
34
+ - revert: drop the dev proxy (dev = plain Vite) ([#13](https://github.com/dacely-cloud/toiljs/pull/13)) by @BlobMaster41
35
+ - chore: unify test dirs (AssemblyScript specs under test/assembly) ([#14](https://github.com/dacely-cloud/toiljs/pull/14)) by @BlobMaster41
36
+ - feat(cli): brand color palette + tagline ([#15](https://github.com/dacely-cloud/toiljs/pull/15)) by @BlobMaster41
37
+ - fix(config): load toil.config via native ESM import ([#16](https://github.com/dacely-cloud/toiljs/pull/16)) by @BlobMaster41
38
+ - fix(io): ambient globals via toiljs/globals (toil-env.d.ts = pure reference) ([#17](https://github.com/dacely-cloud/toiljs/pull/17)) by @BlobMaster41
39
+ - feat(scaffold): brand default app styles ([#18](https://github.com/dacely-cloud/toiljs/pull/18)) by @BlobMaster41
40
+ - fix(io): self-contained toil-env.d.ts (fixes TS2304) ([#19](https://github.com/dacely-cloud/toiljs/pull/19)) by @BlobMaster41
41
+ - fix: inline toil-env globals + spawn DEP0190 + drop Next mentions (0.0.3) ([#21](https://github.com/dacely-cloud/toiljs/pull/21)) by @BlobMaster41
42
+ - feat(create): scaffold the WASM server (toilscript) setup ([#22](https://github.com/dacely-cloud/toiljs/pull/22)) by @BlobMaster41
43
+ - feat: one-command client+server build; example mirrors server setup ([#23](https://github.com/dacely-cloud/toiljs/pull/23)) by @BlobMaster41
44
+ - chore: say toilscript not AssemblyScript; clarify server eslint ignore ([#24](https://github.com/dacely-cloud/toiljs/pull/24)) by @BlobMaster41
45
+ - fix(compiler): extensionless route imports (TS5097) ([#25](https://github.com/dacely-cloud/toiljs/pull/25)) by @BlobMaster41
46
+ - feat(client): prefetch route chunks for visible & hovered links ([#26](https://github.com/dacely-cloud/toiljs/pull/26)) by @BlobMaster41
47
+ - refactor(client): split runtime.tsx into focused modules ([#27](https://github.com/dacely-cloud/toiljs/pull/27)) by @BlobMaster41
48
+ - feat(compiler): user-owned public/index.html template + static assets ([#28](https://github.com/dacely-cloud/toiljs/pull/28)) by @BlobMaster41
49
+ - feat(client): user-owned entry (client/toil.tsx), styles/components dirs, public/images, prettier HTML ([#29](https://github.com/dacely-cloud/toiljs/pull/29)) by @BlobMaster41
50
+ - feat(client): Toil native global + style-import types (TS2882) ([#30](https://github.com/dacely-cloud/toiljs/pull/30)) by @BlobMaster41
51
+ - feat(compiler): unified build/ output (build/client + build/server) ([#31](https://github.com/dacely-cloud/toiljs/pull/31)) by @BlobMaster41
52
+ - feat(cli): style-compiler choice, Tailwind, and toiljs configure ([#32](https://github.com/dacely-cloud/toiljs/pull/32)) by @BlobMaster41
53
+ - chore: strip inline comments (TSDoc only) + server tsconfig for toilscript ([#33](https://github.com/dacely-cloud/toiljs/pull/33)) by @BlobMaster41
54
+ - feat(compiler): move public/ under client (client/public) ([#34](https://github.com/dacely-cloud/toiljs/pull/34)) by @BlobMaster41
55
+ - fix(client): navigate via startTransition (kill Suspense flash) ([#35](https://github.com/dacely-cloud/toiljs/pull/35)) by @BlobMaster41
56
+ - fix(cli): robust toiljs configure + non-interactive flags ([#36](https://github.com/dacely-cloud/toiljs/pull/36)) by @BlobMaster41
57
+ - feat(client): Link forwards full anchor API + replace/prefetch ([#37](https://github.com/dacely-cloud/toiljs/pull/37)) by @BlobMaster41
58
+ - feat(client): NavLink (active class + aria-current) ([#38](https://github.com/dacely-cloud/toiljs/pull/38)) by @BlobMaster41
59
+ - feat(client): useRouter / usePathname / useSearchParams + history nav ([#39](https://github.com/dacely-cloud/toiljs/pull/39)) by @BlobMaster41
60
+ - feat(client): scroll management (top / restore / #hash) + scroll prop ([#40](https://github.com/dacely-cloud/toiljs/pull/40)) by @BlobMaster41
61
+ - feat(client): useNavigationPending() for loading indicators ([#41](https://github.com/dacely-cloud/toiljs/pull/41)) by @BlobMaster41
62
+ - feat(client): nested layouts (routes/**/layout.tsx) ([#42](https://github.com/dacely-cloud/toiljs/pull/42)) by @BlobMaster41
63
+ - feat(client): loading.tsx + error.tsx ([#43](https://github.com/dacely-cloud/toiljs/pull/43)) by @BlobMaster41
64
+ - feat(routing): optional catch-all [[...slug]] + route groups (group) ([#44](https://github.com/dacely-cloud/toiljs/pull/44)) by @BlobMaster41
65
+ - feat(create): AI-assistant helper files → .toil/docs ([#45](https://github.com/dacely-cloud/toiljs/pull/45)) by @BlobMaster41
66
+ - feat(create): AI assistant files are now selectable ([#46](https://github.com/dacely-cloud/toiljs/pull/46)) by @BlobMaster41
67
+ - feat(client): head/metadata API + file-based metadata ([#47](https://github.com/dacely-cloud/toiljs/pull/47)) by @BlobMaster41
68
+ - fix: audit findings ([#48](https://github.com/dacely-cloud/toiljs/pull/48)) by @BlobMaster41
69
+ - feat(compiler): image-import module declarations (svg/png/…) ([#49](https://github.com/dacely-cloud/toiljs/pull/49)) by @BlobMaster41
70
+ - feat(compiler): accept toiljs.config.* as well ([#50](https://github.com/dacely-cloud/toiljs/pull/50)) by @BlobMaster41
71
+ - refactor(client): organize src/client by feature ([#51](https://github.com/dacely-cloud/toiljs/pull/51)) by @BlobMaster41
72
+ - feat(compiler): clear error for empty import specifiers ([#52](https://github.com/dacely-cloud/toiljs/pull/52)) by @BlobMaster41
73
+ - feat(create): app template = the basic example (verbatim) ([#53](https://github.com/dacely-cloud/toiljs/pull/53)) by @BlobMaster41
74
+ - feat(create): explicit None option for AI assistant files ([#54](https://github.com/dacely-cloud/toiljs/pull/54)) by @BlobMaster41
75
+ - feat(create): scaffold .vscode/settings.json (workspace TS sdk) ([#55](https://github.com/dacely-cloud/toiljs/pull/55)) by @BlobMaster41
76
+ - feat(client): route data loaders (loader + useLoaderData) ([#56](https://github.com/dacely-cloud/toiljs/pull/56)) by @BlobMaster41
77
+ - refactor(create): single starter source (examples/basic/client), drop templates/ ([#57](https://github.com/dacely-cloud/toiljs/pull/57)) by @BlobMaster41
78
+ - chore: fix stale templates/app comments ([#58](https://github.com/dacely-cloud/toiljs/pull/58)) by @BlobMaster41
79
+ - feat(client): typed routes (Link/navigate hrefs + useParams) ([#59](https://github.com/dacely-cloud/toiljs/pull/59)) by @BlobMaster41
80
+ - docs: fill .toil/docs (real content, not TODO) ([#60](https://github.com/dacely-cloud/toiljs/pull/60)) by @BlobMaster41
81
+ - test: jsdom runtime tests (navigation / scroll / Link / NavLink) ([#61](https://github.com/dacely-cloud/toiljs/pull/61)) by @BlobMaster41
82
+ - feat(routing): template.tsx + global-error.tsx (+ loader spinner, eslint loader export) ([#62](https://github.com/dacely-cloud/toiljs/pull/62)) by @BlobMaster41
83
+ - fix(routing): instant page switches (no more freeze on navigation) ([#63](https://github.com/dacely-cloud/toiljs/pull/63)) by @BlobMaster41
84
+ - feat(client): <Image> + <Script> components ([#64](https://github.com/dacely-cloud/toiljs/pull/64)) by @BlobMaster41
85
+ - feat(loader): typed useLoaderData + cache control ([#65](https://github.com/dacely-cloud/toiljs/pull/65)) by @BlobMaster41
86
+ - feat(loader): useLoaderData(loader) form + allow revalidate export ([#66](https://github.com/dacely-cloud/toiljs/pull/66)) by @BlobMaster41
87
+ - feat(images): build-time image optimization (on by default) ([#67](https://github.com/dacely-cloud/toiljs/pull/67)) by @BlobMaster41
88
+ - feat(actions): mutations via useAction + <Form> ([#68](https://github.com/dacely-cloud/toiljs/pull/68)) by @BlobMaster41
89
+ - fix(loader): instant navigation (stop re-suspending no-loader routes) ([#69](https://github.com/dacely-cloud/toiljs/pull/69)) by @BlobMaster41
90
+ - feat(images): log optimized images during build ([#70](https://github.com/dacely-cloud/toiljs/pull/70)) by @BlobMaster41
91
+ - fix(routing): restore smooth nav transition (and keep loading spinners) ([#71](https://github.com/dacely-cloud/toiljs/pull/71)) by @BlobMaster41
92
+ - feat(dev): error overlay for uncaught render/async errors ([#73](https://github.com/dacely-cloud/toiljs/pull/73)) by @BlobMaster41
93
+ - feat(routing): parallel + intercepting routes ([#72](https://github.com/dacely-cloud/toiljs/pull/72)) by @BlobMaster41
94
+ - feat(head): metadata API (export const metadata / generateMetadata) ([#74](https://github.com/dacely-cloud/toiljs/pull/74)) by @BlobMaster41
95
+ - feat(seo): per-route build-time SEO + AI/social toolset ([#75](https://github.com/dacely-cloud/toiljs/pull/75)) by @BlobMaster41
96
+ - feat(fonts): preload bundled fonts at build (+ log) ([#77](https://github.com/dacely-cloud/toiljs/pull/77)) by @BlobMaster41
97
+ - fix(loader): show loading.tsx when revalidating the current route ([#76](https://github.com/dacely-cloud/toiljs/pull/76)) by @BlobMaster41
98
+ - feat(routing): opt-in animated view transitions ([#78](https://github.com/dacely-cloud/toiljs/pull/78)) by @BlobMaster41
99
+ - fix(head): per-route metadata wins over layout useHead defaults ([#79](https://github.com/dacely-cloud/toiljs/pull/79)) by @BlobMaster41
100
+ - fix(compiler): stop editors flagging route exports (metadata/loader/…) as unused ([#80](https://github.com/dacely-cloud/toiljs/pull/80)) by @BlobMaster41
101
+ - fix(routing): wire slots into mount, stop @slot routes recursing; full feature demo ([#82](https://github.com/dacely-cloud/toiljs/pull/82)) by @BlobMaster41
102
+ - fix(build): resolve node-polyfill shims for symlinked consumers; absolute demo asset paths ([#83](https://github.com/dacely-cloud/toiljs/pull/83)) by @BlobMaster41
103
+ - docs: README ([#81](https://github.com/dacely-cloud/toiljs/pull/81)) by @BlobMaster41
104
+ - feat(cli): add `toiljs doctor` ([#84](https://github.com/dacely-cloud/toiljs/pull/84)) by @BlobMaster41
105
+ - feat(cli): add `toiljs update` ([#85](https://github.com/dacely-cloud/toiljs/pull/85)) by @BlobMaster41
106
+ - feat(search): build-time page search + usePageSearch ([#86](https://github.com/dacely-cloud/toiljs/pull/86)) by @BlobMaster41
107
+ - fix(pkg): correct package description ([#87](https://github.com/dacely-cloud/toiljs/pull/87)) by @BlobMaster41
108
+ - fix(compiler): resolve broken vite-imagetools/client type reference ([#90](https://github.com/dacely-cloud/toiljs/pull/90)) by @BlobMaster41
109
+ - style: fix syntax ([#89](https://github.com/dacely-cloud/toiljs/pull/89)) by @BlobMaster41
110
+ - fix(readme): absolute logo URL for npm ([#91](https://github.com/dacely-cloud/toiljs/pull/91)) by @BlobMaster41
111
+ - build(cli): bundle the CLI, stop @clack leaking into consumers ([#93](https://github.com/dacely-cloud/toiljs/pull/93)) by @BlobMaster41
112
+ - feat(head): component metadata (useMetadata/<Metadata>) + href() helper ([#92](https://github.com/dacely-cloud/toiljs/pull/92)) by @BlobMaster41
113
+ - feat(ssg): build-time prerender for dynamic routes via generateStaticParams ([#94](https://github.com/dacely-cloud/toiljs/pull/94)) by @BlobMaster41
114
+ - feat(routing): loader transition off by default (opt-in client.transitions) ([#95](https://github.com/dacely-cloud/toiljs/pull/95)) by @BlobMaster41
115
+ - fix(routing): no empty page on navigation + fade-in ([#96](https://github.com/dacely-cloud/toiljs/pull/96)) by @BlobMaster41
116
+ - feat(seo): full page index in llms.txt (static + SSG, with metadata) ([#97](https://github.com/dacely-cloud/toiljs/pull/97)) by @BlobMaster41
117
+ - feat(dev): dev toolbar (Phase 1) ([#98](https://github.com/dacely-cloud/toiljs/pull/98)) by @BlobMaster41
118
+ - feat(dev): dev toolbar Data + Head/SEO tabs (Phase 2) ([#99](https://github.com/dacely-cloud/toiljs/pull/99)) by @BlobMaster41
119
+ - feat(devtools): AI assist + command palette (Phase 3) ([#100](https://github.com/dacely-cloud/toiljs/pull/100)) by @BlobMaster41
120
+ - docs(devtools): README section + export AiProvider for typed config ([#101](https://github.com/dacely-cloud/toiljs/pull/101)) by @BlobMaster41
121
+ - fix(devtools): cache getSnapshot to stop Data-tab infinite loop ([#102](https://github.com/dacely-cloud/toiljs/pull/102)) by @BlobMaster41
122
+ - fix(devtools): show vite version + tidy no-loader Data tab ([#104](https://github.com/dacely-cloud/toiljs/pull/104)) by @BlobMaster41
123
+ - fix(routing): hold previous page during navigation instead of blanking ([#103](https://github.com/dacely-cloud/toiljs/pull/103)) by @BlobMaster41
124
+ - feat(routing): prefetch loader data on hover so navigation feels instant ([#105](https://github.com/dacely-cloud/toiljs/pull/105)) by @BlobMaster41
125
+ - refactor(routing): drop the page fade-in ([#106](https://github.com/dacely-cloud/toiljs/pull/106)) by @BlobMaster41
126
+ - fix(pkg): add repository field for npm provenance ([#107](https://github.com/dacely-cloud/toiljs/pull/107)) by @BlobMaster41
127
+
128
+
129
+
130
+
3
131
  All notable changes to this project will be documented in this file.
4
132
 
5
133
  This changelog is automatically generated from merged pull requests.