@quilted/create 0.2.42 → 0.2.44

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 (285) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/build/esm/_virtual/index.mjs +6 -2
  3. package/build/esm/_virtual/index10.mjs +3 -0
  4. package/build/esm/_virtual/index11.mjs +3 -0
  5. package/build/esm/_virtual/index12.mjs +3 -0
  6. package/build/esm/_virtual/index13.mjs +3 -0
  7. package/build/esm/_virtual/index2.mjs +2 -2
  8. package/build/esm/_virtual/index3.mjs +6 -2
  9. package/build/esm/_virtual/index4.mjs +6 -2
  10. package/build/esm/_virtual/index5.mjs +6 -2
  11. package/build/esm/_virtual/index6.mjs +6 -2
  12. package/build/esm/_virtual/index8.mjs +3 -0
  13. package/build/esm/_virtual/index9.mjs +3 -0
  14. package/build/esm/_virtual/minimatch.mjs +12 -0
  15. package/build/esm/app.mjs +2 -2
  16. package/build/esm/cli.mjs +1 -1
  17. package/build/esm/module.mjs +2 -2
  18. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.mjs +29 -21
  19. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.mjs +24 -18
  20. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.mjs +35 -32
  21. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.mjs +103 -101
  22. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.mjs +19 -13
  23. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.mjs +63 -61
  24. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.mjs +33 -27
  25. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.mjs +25 -19
  26. package/build/esm/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.mjs +15 -10
  27. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.mjs +27 -19
  28. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.mjs +35 -32
  29. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.mjs +39 -33
  30. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.mjs +26 -20
  31. package/build/esm/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.mjs +24 -17
  32. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.mjs +44 -42
  33. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.mjs +37 -30
  34. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.mjs +41 -34
  35. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.mjs +22 -15
  36. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.mjs +103 -98
  37. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.mjs +35 -29
  38. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.mjs +19 -12
  39. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.mjs +64 -59
  40. package/build/esm/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.mjs +34 -27
  41. package/build/esm/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.mjs +116 -112
  42. package/build/esm/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.mjs +54 -47
  43. package/build/esm/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.mjs +144 -137
  44. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.mjs +173 -166
  45. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.mjs +57 -51
  46. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.mjs +102 -94
  47. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.mjs +89 -83
  48. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.mjs +312 -305
  49. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.mjs +30 -24
  50. package/build/esm/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.mjs +116 -108
  51. package/build/esm/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.mjs +1 -3
  52. package/build/esm/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.mjs +63 -61
  53. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.mjs +75 -77
  54. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.mjs +28 -22
  55. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.mjs +83 -78
  56. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.mjs +31 -25
  57. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.mjs +66 -60
  58. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.mjs +66 -59
  59. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.mjs +23 -16
  60. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.mjs +55 -48
  61. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.mjs +40 -33
  62. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.mjs +59 -55
  63. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.mjs +38 -32
  64. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.mjs +31 -25
  65. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.mjs +33 -26
  66. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.mjs +43 -38
  67. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.mjs +41 -35
  68. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.mjs +60 -55
  69. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.mjs +48 -43
  70. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.mjs +65 -57
  71. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.mjs +26 -20
  72. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.mjs +14 -8
  73. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.mjs +25 -19
  74. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.mjs +33 -34
  75. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.mjs +39 -33
  76. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.mjs +170 -164
  77. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.mjs +24 -18
  78. package/build/esm/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.mjs +18 -12
  79. package/build/esm/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.mjs +227 -221
  80. package/build/esm/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.mjs +207 -200
  81. package/build/esm/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.mjs +1 -6
  82. package/build/esm/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.mjs +51 -44
  83. package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.mjs +2 -2
  84. package/build/esm/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.mjs +3 -3
  85. package/build/esm/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.mjs +443 -439
  86. package/build/esm/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.mjs +18 -11
  87. package/build/esm/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.mjs +116 -109
  88. package/build/esm/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.mjs +17 -10
  89. package/build/esm/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.mjs +117 -110
  90. package/build/esm/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.mjs +457 -451
  91. package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.mjs +14 -7
  92. package/build/esm/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.mjs +770 -770
  93. package/build/esm/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.mjs +40 -34
  94. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.mjs +10 -3
  95. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.mjs +227 -220
  96. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.mjs +941 -935
  97. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.mjs +331 -325
  98. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.mjs +303 -297
  99. package/build/esm/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.mjs +65 -57
  100. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.mjs +605 -605
  101. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.mjs +378 -394
  102. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.mjs +15 -15
  103. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.mjs +281 -294
  104. package/build/esm/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.mjs +155 -155
  105. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.mjs +1 -1
  106. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.mjs +1 -1
  107. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.mjs +1 -1
  108. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.mjs +17 -12
  109. package/build/esm/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.mjs +1 -1
  110. package/build/esm/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.mjs +14 -7
  111. package/build/esm/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.mjs +29 -22
  112. package/build/esm/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.mjs +49 -42
  113. package/build/esm/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.mjs +231 -224
  114. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.mjs +1 -1
  115. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.mjs +1 -1
  116. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.mjs +3 -3
  117. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.mjs +2 -2
  118. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.mjs +1 -1
  119. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.mjs +2 -2
  120. package/build/esm/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.mjs +1 -1
  121. package/build/esm/package.mjs +2 -2
  122. package/build/esm/packages/cli-kit/build/esnext/prompt.esnext.mjs +1 -1
  123. package/build/esm/server.mjs +5 -9
  124. package/build/esm/shared/package-manager.mjs +1 -1
  125. package/build/esm/shared/prompts.mjs +1 -1
  126. package/build/esnext/_virtual/index.esnext +6 -2
  127. package/build/esnext/_virtual/index10.esnext +3 -0
  128. package/build/esnext/_virtual/index11.esnext +3 -0
  129. package/build/esnext/_virtual/index12.esnext +3 -0
  130. package/build/esnext/_virtual/index13.esnext +3 -0
  131. package/build/esnext/_virtual/index2.esnext +2 -2
  132. package/build/esnext/_virtual/index3.esnext +6 -2
  133. package/build/esnext/_virtual/index4.esnext +6 -2
  134. package/build/esnext/_virtual/index5.esnext +6 -2
  135. package/build/esnext/_virtual/index6.esnext +6 -2
  136. package/build/esnext/_virtual/index8.esnext +3 -0
  137. package/build/esnext/_virtual/index9.esnext +3 -0
  138. package/build/esnext/_virtual/minimatch.esnext +12 -0
  139. package/build/esnext/app.esnext +2 -2
  140. package/build/esnext/module.esnext +2 -2
  141. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.esnext +27 -19
  142. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.esnext +19 -13
  143. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.esnext +33 -30
  144. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.esnext +99 -97
  145. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.esnext +14 -8
  146. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.esnext +59 -57
  147. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.esnext +31 -25
  148. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.esnext +23 -17
  149. package/build/esnext/node_modules/.pnpm/@nodelib_fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.esnext +13 -8
  150. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.esnext +25 -17
  151. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.esnext +33 -30
  152. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.esnext +38 -32
  153. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.esnext +25 -19
  154. package/build/esnext/node_modules/.pnpm/@nodelib_fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.esnext +23 -16
  155. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.esnext +42 -40
  156. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.esnext +36 -29
  157. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.esnext +40 -33
  158. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.esnext +21 -14
  159. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.esnext +98 -93
  160. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.esnext +30 -24
  161. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.esnext +17 -10
  162. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.esnext +59 -54
  163. package/build/esnext/node_modules/.pnpm/@nodelib_fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.esnext +33 -26
  164. package/build/esnext/node_modules/.pnpm/arg@5.0.2/node_modules/arg/index.esnext +132 -128
  165. package/build/esnext/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.esnext +54 -47
  166. package/build/esnext/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext +137 -130
  167. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.esnext +66 -59
  168. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.esnext +53 -47
  169. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.esnext +102 -95
  170. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.esnext +89 -83
  171. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.esnext +217 -210
  172. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.esnext +30 -24
  173. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.esnext +75 -67
  174. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.esnext +1 -3
  175. package/build/esnext/node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.esnext +63 -61
  176. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/index.esnext +68 -70
  177. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/patterns.esnext +17 -11
  178. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/managers/tasks.esnext +81 -76
  179. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/async.esnext +29 -23
  180. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/deep.esnext +61 -55
  181. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/entry.esnext +61 -54
  182. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/filters/error.esnext +21 -14
  183. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/matcher.esnext +49 -42
  184. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/matchers/partial.esnext +31 -24
  185. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/provider.esnext +57 -53
  186. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/stream.esnext +34 -28
  187. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/sync.esnext +29 -23
  188. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/providers/transformers/entry.esnext +29 -22
  189. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/async.esnext +40 -35
  190. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/reader.esnext +39 -33
  191. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/stream.esnext +56 -51
  192. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/readers/sync.esnext +46 -41
  193. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/settings.esnext +59 -51
  194. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/array.esnext +24 -18
  195. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/errno.esnext +12 -6
  196. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/fs.esnext +23 -17
  197. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/index.esnext +31 -32
  198. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/path.esnext +32 -26
  199. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/pattern.esnext +135 -129
  200. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/stream.esnext +23 -17
  201. package/build/esnext/node_modules/.pnpm/fast-glob@3.2.12/node_modules/fast-glob/out/utils/string.esnext +16 -10
  202. package/build/esnext/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.esnext +220 -215
  203. package/build/esnext/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.esnext +193 -186
  204. package/build/esnext/node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.esnext +1 -6
  205. package/build/esnext/node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.esnext +31 -24
  206. package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/ignore.esnext +2 -2
  207. package/build/esnext/node_modules/.pnpm/globby@13.1.1/node_modules/globby/index.esnext +3 -3
  208. package/build/esnext/node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.esnext +357 -353
  209. package/build/esnext/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.esnext +18 -11
  210. package/build/esnext/node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.esnext +111 -104
  211. package/build/esnext/node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.esnext +17 -10
  212. package/build/esnext/node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.esnext +103 -96
  213. package/build/esnext/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.esnext +147 -141
  214. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.esnext +10 -3
  215. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.esnext +495 -491
  216. package/build/esnext/node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.esnext +38 -32
  217. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.esnext +10 -3
  218. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.esnext +198 -191
  219. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.esnext +683 -677
  220. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.esnext +137 -131
  221. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.esnext +279 -273
  222. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.esnext +65 -57
  223. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/babel.esnext +9 -9
  224. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/estree.esnext +20 -20
  225. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/typescript.esnext +15 -15
  226. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/plugins/yaml.esnext +64 -64
  227. package/build/esnext/node_modules/.pnpm/prettier@3.0.0/node_modules/prettier/standalone.esnext +19 -19
  228. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.esnext +1 -1
  229. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.esnext +1 -1
  230. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.esnext +16 -11
  231. package/build/esnext/node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.esnext +12 -5
  232. package/build/esnext/node_modules/.pnpm/reusify@1.0.4/node_modules/reusify/reusify.esnext +29 -22
  233. package/build/esnext/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.esnext +47 -40
  234. package/build/esnext/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.esnext +196 -189
  235. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.esnext +2 -0
  236. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.esnext +2 -0
  237. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-props.esnext +1 -0
  238. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/YAMLMap.esnext +1 -1
  239. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.esnext +1 -1
  240. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/lexer.esnext +5 -0
  241. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/parser.esnext +4 -0
  242. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/tags.esnext +3 -3
  243. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.esnext +2 -2
  244. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.esnext +1 -1
  245. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.esnext +2 -2
  246. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/stringify/stringifyString.esnext +1 -1
  247. package/build/esnext/package.esnext +2 -2
  248. package/build/esnext/packages/cli-kit/build/esnext/prompt.esnext.esnext +1 -1
  249. package/build/esnext/server.esnext +5 -9
  250. package/build/esnext/shared/package-manager.esnext +1 -1
  251. package/build/esnext/shared/prompts.esnext +1 -1
  252. package/build/tsconfig.tsbuildinfo +1 -1
  253. package/package.json +3 -3
  254. package/source/shared/prompts.ts +1 -1
  255. package/templates/app-basic/App.tsx +3 -4
  256. package/templates/app-basic/browser.tsx +5 -1
  257. package/templates/app-basic/foundation/html/Head.test.tsx +42 -0
  258. package/templates/app-basic/foundation/html/Head.tsx +34 -0
  259. package/templates/app-basic/foundation/html.ts +1 -1
  260. package/templates/app-basic/package.json +4 -4
  261. package/templates/app-basic/server.tsx +89 -3
  262. package/templates/app-empty/package.json +3 -3
  263. package/templates/app-empty/server.tsx +4 -3
  264. package/templates/app-graphql/App.tsx +3 -4
  265. package/templates/app-graphql/browser.tsx +5 -1
  266. package/templates/app-graphql/foundation/html/Head.test.tsx +42 -0
  267. package/templates/app-graphql/foundation/html/Head.tsx +34 -0
  268. package/templates/app-graphql/foundation/html.ts +1 -1
  269. package/templates/app-graphql/package.json +4 -4
  270. package/templates/app-graphql/server.tsx +93 -9
  271. package/templates/app-trpc/App.tsx +3 -4
  272. package/templates/app-trpc/browser.tsx +5 -1
  273. package/templates/app-trpc/foundation/html/Head.test.tsx +42 -0
  274. package/templates/app-trpc/foundation/html/Head.tsx +34 -0
  275. package/templates/app-trpc/foundation/html.ts +1 -1
  276. package/templates/app-trpc/package.json +4 -4
  277. package/templates/app-trpc/server.tsx +93 -8
  278. package/templates/package/package.json +3 -3
  279. package/templates/workspace/package.json +4 -4
  280. package/templates/app-basic/foundation/html/HTML.test.tsx +0 -46
  281. package/templates/app-basic/foundation/html/HTML.tsx +0 -159
  282. package/templates/app-graphql/foundation/html/HTML.test.tsx +0 -46
  283. package/templates/app-graphql/foundation/html/HTML.tsx +0 -159
  284. package/templates/app-trpc/foundation/html/HTML.test.tsx +0 -46
  285. package/templates/app-trpc/foundation/html/HTML.tsx +0 -159
@@ -1,7 +1,16 @@
1
1
  import '@quilted/quilt/globals';
2
+
2
3
  import {RequestRouter} from '@quilted/quilt/request-router';
3
- import {renderToResponse} from '@quilted/quilt/server';
4
4
  import {Router} from '@quilted/quilt/navigation';
5
+ import {
6
+ renderAppToHTMLResponse,
7
+ cacheControlHeader,
8
+ contentSecurityPolicyHeader,
9
+ permissionsPolicyHeader,
10
+ strictTransportSecurityHeader,
11
+ } from '@quilted/quilt/server';
12
+
13
+ import Env from 'quilt:module/env';
5
14
  import {BrowserAssets} from 'quilt:module/assets';
6
15
 
7
16
  import type {AppContext} from '~/shared/context.ts';
@@ -11,15 +20,92 @@ import {App} from './App.tsx';
11
20
  const router = new RequestRouter();
12
21
  const assets = new BrowserAssets();
13
22
 
14
- // For all GET requests, render our React application.
23
+ // For all GET requests, render our Preact application.
15
24
  router.get(async (request) => {
16
25
  const context = {
17
26
  router: new Router(request.url),
18
27
  } satisfies AppContext;
19
28
 
20
- const response = await renderToResponse(<App context={context} />, {
29
+ const isHttps = request.url.startsWith('https://');
30
+
31
+ const response = await renderAppToHTMLResponse(<App context={context} />, {
21
32
  request,
22
33
  assets,
34
+ headers: {
35
+ // Controls how much information about the current page is included in
36
+ // requests (through the `Referer` header). The default value
37
+ // (strict-origin-when-cross-origin) means that only the origin is included
38
+ // for cross-origin requests, while the origin, path, and querystring
39
+ // are included for same-origin requests.
40
+ //
41
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
42
+ 'Referrer-Policy': 'strict-origin-when-cross-origin',
43
+
44
+ // Disables the cache for this page, which is generally the best option
45
+ // when dealing with authenticated content. If your site doesn't have
46
+ // authentication, or you have a better cache policy that works for your
47
+ // app or deployment, make sure to update this component accordingly!
48
+ //
49
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
50
+ 'Cache-Control': cacheControlHeader({
51
+ cache: false,
52
+ }),
53
+
54
+ // Sets a strict content security policy for this page. If you load
55
+ // assets from other origins, or want to allow some more dangerous
56
+ // resource loading techniques like `eval`, you can change the
57
+ // `defaultSources` to be less restrictive, or add additional items
58
+ // to the allowlist for more specific directives.
59
+ //
60
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
61
+ 'Content-Security-Policy': contentSecurityPolicyHeader({
62
+ // By default, only allow sources from the page's origin.
63
+ defaultSources: ["'self'"],
64
+ // In development, allow connections to local websockets for hot reloading.
65
+ connectSources:
66
+ Env.MODE === 'development'
67
+ ? ["'self'", `${isHttps ? 'ws' : 'wss'}://localhost:*`]
68
+ : undefined,
69
+ // Includes `'unsafe-inline'` because CSS is often necessary in development,
70
+ // and can be difficult to avoid in production.
71
+ styleSources: ["'self'", "'unsafe-inline'"],
72
+ // Includes `data:` so that an inline image can be used for the favicon.
73
+ // If you do not use the `emoji` or `blank` favicons in your app, and you
74
+ // do not load any other images as data URIs, you can remove this directive.
75
+ imageSources: ["'self'", 'data:'],
76
+ // Don't allow this page to be rendered as a frame from a different origin.
77
+ frameAncestors: false,
78
+ // Ensure that all requests made by this page are made over https, unless
79
+ // it is being served over http (typically, during local development)
80
+ upgradeInsecureRequests: isHttps,
81
+ }),
82
+
83
+ // Sets a strict permissions policy for this page, which limits access
84
+ // to some native browser features.
85
+ //
86
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
87
+ 'Permissions-Policy': permissionsPolicyHeader({
88
+ // Disables Google's Federated Learning of Cohorts ("FLoC") tracking initiative.
89
+ // @see https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
90
+ interestCohort: false,
91
+ // Don't use synchronous XHRs!
92
+ // @see https://featurepolicy.info/policies/sync-xhr
93
+ syncXhr: false,
94
+ // Disables access to a few device APIs that are infrequently used
95
+ // and prone to abuse. If your application uses these APIs intentionally,
96
+ // feel free to remove the prop, or pass an array containing the origins
97
+ // that should be allowed to use this feature (e.g., `['self']` to allow
98
+ // only the main page's origin).
99
+ camera: false,
100
+ microphone: false,
101
+ geolocation: false,
102
+ }),
103
+
104
+ // Instructs browsers to only load this page over HTTPS.
105
+ //
106
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
107
+ 'Strict-Transport-Security': strictTransportSecurityHeader(),
108
+ },
23
109
  });
24
110
 
25
111
  return response;
@@ -16,9 +16,9 @@
16
16
  "dependencies": {},
17
17
  "devDependencies": {
18
18
  "@quilted/quilt": "^0.8.0",
19
- "preact": "^10.21.0",
20
- "react": "npm:@quilted/react@^18.2.0",
21
- "react-dom": "npm:@quilted/react-dom@^18.2.0"
19
+ "preact": "^10.26.0",
20
+ "react": "npm:@quilted/react@^19.0.0",
21
+ "react-dom": "npm:@quilted/react-dom@^19.0.0"
22
22
  },
23
23
  "sideEffects": [
24
24
  "*.css",
@@ -1,6 +1,7 @@
1
1
  import '@quilted/quilt/globals';
2
+
2
3
  import {RequestRouter} from '@quilted/quilt/request-router';
3
- import {renderToResponse} from '@quilted/quilt/server';
4
+ import {renderAppToHTMLResponse} from '@quilted/quilt/server';
4
5
  import {BrowserAssets} from 'quilt:module/assets';
5
6
 
6
7
  import {App} from './App.tsx';
@@ -8,9 +9,9 @@ import {App} from './App.tsx';
8
9
  const router = new RequestRouter();
9
10
  const assets = new BrowserAssets();
10
11
 
11
- // For all GET requests, render our React application.
12
+ // For all GET requests, render our Preact application.
12
13
  router.get(async (request) => {
13
- const response = await renderToResponse(<App />, {
14
+ const response = await renderAppToHTMLResponse(<App />, {
14
15
  request,
15
16
  assets,
16
17
  });
@@ -5,7 +5,7 @@ import {GraphQLContext} from '@quilted/quilt/graphql';
5
5
  import {Navigation} from '@quilted/quilt/navigation';
6
6
  import {Localization} from '@quilted/quilt/localize';
7
7
 
8
- import {HTML} from './foundation/html.ts';
8
+ import {Head} from './foundation/html.ts';
9
9
  import {Frame} from './foundation/frame.ts';
10
10
 
11
11
  import {Home, homeQuery} from './features/home.ts';
@@ -42,9 +42,8 @@ const routes = [
42
42
  export function App({context}: AppProps) {
43
43
  return (
44
44
  <AppContext context={context}>
45
- <HTML>
46
- <Navigation router={context.router} routes={routes} context={context} />
47
- </HTML>
45
+ <Head />
46
+ <Navigation router={context.router} routes={routes} context={context} />
48
47
  </AppContext>
49
48
  );
50
49
  }
@@ -20,6 +20,10 @@ const context = {
20
20
  } satisfies AppContext;
21
21
 
22
22
  // Makes key parts of the app available in the browser console
23
- Object.assign(globalThis, {app: context});
23
+ Object.defineProperty(globalThis, 'app', {
24
+ value: {context},
25
+ enumerable: false,
26
+ configurable: true,
27
+ });
24
28
 
25
29
  hydrate(<App context={context} />);
@@ -0,0 +1,42 @@
1
+ import {describe, it, expect} from 'vitest';
2
+ import {Title, Favicon} from '@quilted/quilt/browser';
3
+ import {SearchRobots, Viewport} from '@quilted/quilt/server';
4
+
5
+ import {renderApp} from '~/tests/render.ts';
6
+
7
+ import {Head} from './Head.tsx';
8
+
9
+ describe('<Head />', () => {
10
+ it('sets the default title', async () => {
11
+ const head = await renderApp(<Head />);
12
+
13
+ expect(head).toContainPreactComponent(Title, {
14
+ children: 'App',
15
+ });
16
+ });
17
+
18
+ it('uses a fun, emoji favicon', async () => {
19
+ const head = await renderApp(<Head />);
20
+
21
+ expect(head).toContainPreactComponent(Favicon, {
22
+ emoji: '🧶',
23
+ });
24
+ });
25
+
26
+ it('includes a responsive viewport tag', async () => {
27
+ const head = await renderApp(<Head />);
28
+
29
+ expect(head).toContainPreactComponent(Viewport, {
30
+ cover: true,
31
+ });
32
+ });
33
+
34
+ it('prevents search robots from indexing the application', async () => {
35
+ const head = await renderApp(<Head />);
36
+
37
+ expect(head).toContainPreactComponent(SearchRobots, {
38
+ index: false,
39
+ follow: false,
40
+ });
41
+ });
42
+ });
@@ -0,0 +1,34 @@
1
+ import {Title, Favicon} from '@quilted/quilt/browser';
2
+ import {SearchRobots, Viewport} from '@quilted/quilt/server';
3
+
4
+ // This component sets default `<head>` details of the HTML page. If you need
5
+ // to customize any of these details based on conditions or application data, you
6
+ // can render these same components deeper in the application to override these defaults.
7
+ //
8
+ // @see https://github.com/lemonmade/quilt/blob/main/documentation/features/html.md
9
+ export function Head() {
10
+ return (
11
+ <>
12
+ {/* Sets the default `<title>` for this application. */}
13
+ <Title>App</Title>
14
+
15
+ {/*
16
+ * Sets the default favicon used by the application. You can
17
+ * change this to a different emoji, make it `blank`, or pass
18
+ * a URL with the `source` prop.
19
+ */}
20
+ <Favicon emoji="🧶" />
21
+
22
+ {/* Adds a responsive-friendly `viewport` `<meta>` tag. */}
23
+ <Viewport cover />
24
+
25
+ {/*
26
+ * Disables all search indexing for this application. If you are
27
+ * building an unauthenticated app, you probably want to remove
28
+ * this component, or update it to control how your site is indexed
29
+ * by search engines.
30
+ */}
31
+ <SearchRobots index={false} follow={false} />
32
+ </>
33
+ );
34
+ }
@@ -1 +1 @@
1
- export {HTML} from './html/HTML.tsx';
1
+ export {Head} from './html/Head.tsx';
@@ -18,10 +18,10 @@
18
18
  "@quilted/graphql-tools": "^0.2.0",
19
19
  "@quilted/quilt": "^0.8.0",
20
20
  "graphql": "^16.8.0",
21
- "jsdom": "^24.0.0",
22
- "preact": "^10.21.0",
23
- "react": "npm:@quilted/react@^18.2.0",
24
- "react-dom": "npm:@quilted/react-dom@^18.2.0"
21
+ "jsdom": "^26.0.0",
22
+ "preact": "^10.26.0",
23
+ "react": "npm:@quilted/react@^19.0.0",
24
+ "react-dom": "npm:@quilted/react-dom@^19.0.0"
25
25
  },
26
26
  "sideEffects": [
27
27
  "*.css",
@@ -2,6 +2,15 @@ import '@quilted/quilt/globals';
2
2
 
3
3
  import {RequestRouter, JSONResponse} from '@quilted/quilt/request-router';
4
4
  import {Router} from '@quilted/quilt/navigation';
5
+ import {
6
+ renderAppToHTMLResponse,
7
+ cacheControlHeader,
8
+ contentSecurityPolicyHeader,
9
+ permissionsPolicyHeader,
10
+ strictTransportSecurityHeader,
11
+ } from '@quilted/quilt/server';
12
+
13
+ import Env from 'quilt:module/env';
5
14
  import {BrowserAssets} from 'quilt:module/assets';
6
15
 
7
16
  import type {AppContext} from '~/shared/context.ts';
@@ -22,15 +31,13 @@ router.post('/api/graphql', async (request) => {
22
31
  return new JSONResponse(result);
23
32
  });
24
33
 
25
- // For all GET requests, render our React application.
34
+ // For all GET requests, render our Preact application.
26
35
  router.get(async (request) => {
27
- const [{App}, {performGraphQLOperation}, {GraphQLCache}, {renderToResponse}] =
28
- await Promise.all([
29
- import('./App.tsx'),
30
- import('./server/graphql.ts'),
31
- import('@quilted/quilt/graphql'),
32
- import('@quilted/quilt/server'),
33
- ]);
36
+ const [{App}, {performGraphQLOperation}, {GraphQLCache}] = await Promise.all([
37
+ import('./App.tsx'),
38
+ import('./server/graphql.ts'),
39
+ import('@quilted/quilt/graphql'),
40
+ ]);
34
41
 
35
42
  const context = {
36
43
  router: new Router(request.url),
@@ -40,9 +47,86 @@ router.get(async (request) => {
40
47
  },
41
48
  } satisfies AppContext;
42
49
 
43
- const response = await renderToResponse(<App context={context} />, {
50
+ const isHttps = request.url.startsWith('https://');
51
+
52
+ const response = await renderAppToHTMLResponse(<App context={context} />, {
44
53
  request,
45
54
  assets,
55
+ headers: {
56
+ // Controls how much information about the current page is included in
57
+ // requests (through the `Referer` header). The default value
58
+ // (strict-origin-when-cross-origin) means that only the origin is included
59
+ // for cross-origin requests, while the origin, path, and querystring
60
+ // are included for same-origin requests.
61
+ //
62
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
63
+ 'Referrer-Policy': 'strict-origin-when-cross-origin',
64
+
65
+ // Disables the cache for this page, which is generally the best option
66
+ // when dealing with authenticated content. If your site doesn't have
67
+ // authentication, or you have a better cache policy that works for your
68
+ // app or deployment, make sure to update this component accordingly!
69
+ //
70
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
71
+ 'Cache-Control': cacheControlHeader({
72
+ cache: false,
73
+ }),
74
+
75
+ // Sets a strict content security policy for this page. If you load
76
+ // assets from other origins, or want to allow some more dangerous
77
+ // resource loading techniques like `eval`, you can change the
78
+ // `defaultSources` to be less restrictive, or add additional items
79
+ // to the allowlist for more specific directives.
80
+ //
81
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
82
+ 'Content-Security-Policy': contentSecurityPolicyHeader({
83
+ // By default, only allow sources from the page's origin.
84
+ defaultSources: ["'self'"],
85
+ // In development, allow connections to local websockets for hot reloading.
86
+ connectSources:
87
+ Env.MODE === 'development'
88
+ ? ["'self'", `${isHttps ? 'ws' : 'wss'}://localhost:*`]
89
+ : undefined,
90
+ // Includes `'unsafe-inline'` because CSS is often necessary in development,
91
+ // and can be difficult to avoid in production.
92
+ styleSources: ["'self'", "'unsafe-inline'"],
93
+ // Includes `data:` so that an inline image can be used for the favicon.
94
+ // If you do not use the `emoji` or `blank` favicons in your app, and you
95
+ // do not load any other images as data URIs, you can remove this directive.
96
+ imageSources: ["'self'", 'data:'],
97
+ // Don't allow this page to be rendered as a frame from a different origin.
98
+ frameAncestors: false,
99
+ // Ensure that all requests made by this page are made over https, unless
100
+ // it is being served over http (typically, during local development)
101
+ upgradeInsecureRequests: isHttps,
102
+ }),
103
+
104
+ // Sets a strict permissions policy for this page, which limits access
105
+ // to some native browser features.
106
+ //
107
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
108
+ 'Permissions-Policy': permissionsPolicyHeader({
109
+ // Disables Google's Federated Learning of Cohorts ("FLoC") tracking initiative.
110
+ // @see https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
111
+ interestCohort: false,
112
+ // Don't use synchronous XHRs!
113
+ // @see https://featurepolicy.info/policies/sync-xhr
114
+ syncXhr: false,
115
+ // Disables access to a few device APIs that are infrequently used
116
+ // and prone to abuse. If your application uses these APIs intentionally,
117
+ // feel free to remove the prop, or pass an array containing the origins
118
+ // that should be allowed to use this feature (e.g., `['self']` to allow
119
+ // only the main page's origin).
120
+ camera: false,
121
+ microphone: false,
122
+ geolocation: false,
123
+ }),
124
+
125
+ // Instructs browsers to only load this page over HTTPS.
126
+ //
127
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
128
+ 'Strict-Transport-Security': strictTransportSecurityHeader(),
129
+ },
46
130
  });
47
131
 
48
132
  return response;
@@ -6,7 +6,7 @@ import {Localization} from '@quilted/quilt/localize';
6
6
 
7
7
  import {ReactQueryContext} from '@quilted/react-query';
8
8
 
9
- import {HTML} from './foundation/html.ts';
9
+ import {Head} from './foundation/html.ts';
10
10
  import {Frame} from './foundation/frame.ts';
11
11
 
12
12
  import {Home} from './features/home.ts';
@@ -44,9 +44,8 @@ const routes = [
44
44
  export function App({context}: AppProps) {
45
45
  return (
46
46
  <AppContext context={context}>
47
- <HTML>
48
- <Navigation router={context.router} routes={routes} context={context} />
49
- </HTML>
47
+ <Head />
48
+ <Navigation router={context.router} routes={routes} context={context} />
50
49
  </AppContext>
51
50
  );
52
51
  }
@@ -23,6 +23,10 @@ const context = {
23
23
  } satisfies AppContext;
24
24
 
25
25
  // Makes key parts of the app available in the browser console
26
- Object.assign(globalThis, {app: context});
26
+ Object.defineProperty(globalThis, 'app', {
27
+ value: {context},
28
+ enumerable: false,
29
+ configurable: true,
30
+ });
27
31
 
28
32
  hydrate(<App context={context} />);
@@ -0,0 +1,42 @@
1
+ import {describe, it, expect} from 'vitest';
2
+ import {Title, Favicon} from '@quilted/quilt/browser';
3
+ import {SearchRobots, Viewport} from '@quilted/quilt/server';
4
+
5
+ import {renderApp} from '~/tests/render.ts';
6
+
7
+ import {Head} from './Head.tsx';
8
+
9
+ describe('<Head />', () => {
10
+ it('sets the default title', async () => {
11
+ const head = await renderApp(<Head />);
12
+
13
+ expect(head).toContainPreactComponent(Title, {
14
+ children: 'App',
15
+ });
16
+ });
17
+
18
+ it('uses a fun, emoji favicon', async () => {
19
+ const head = await renderApp(<Head />);
20
+
21
+ expect(head).toContainPreactComponent(Favicon, {
22
+ emoji: '🧶',
23
+ });
24
+ });
25
+
26
+ it('includes a responsive viewport tag', async () => {
27
+ const head = await renderApp(<Head />);
28
+
29
+ expect(head).toContainPreactComponent(Viewport, {
30
+ cover: true,
31
+ });
32
+ });
33
+
34
+ it('prevents search robots from indexing the application', async () => {
35
+ const head = await renderApp(<Head />);
36
+
37
+ expect(head).toContainPreactComponent(SearchRobots, {
38
+ index: false,
39
+ follow: false,
40
+ });
41
+ });
42
+ });
@@ -0,0 +1,34 @@
1
+ import {Title, Favicon} from '@quilted/quilt/browser';
2
+ import {SearchRobots, Viewport} from '@quilted/quilt/server';
3
+
4
+ // This component sets default `<head>` details of the HTML page. If you need
5
+ // to customize any of these details based on conditions or application data, you
6
+ // can render these same components deeper in the application to override these defaults.
7
+ //
8
+ // @see https://github.com/lemonmade/quilt/blob/main/documentation/features/html.md
9
+ export function Head() {
10
+ return (
11
+ <>
12
+ {/* Sets the default `<title>` for this application. */}
13
+ <Title>App</Title>
14
+
15
+ {/*
16
+ * Sets the default favicon used by the application. You can
17
+ * change this to a different emoji, make it `blank`, or pass
18
+ * a URL with the `source` prop.
19
+ */}
20
+ <Favicon emoji="🧶" />
21
+
22
+ {/* Adds a responsive-friendly `viewport` `<meta>` tag. */}
23
+ <Viewport cover />
24
+
25
+ {/*
26
+ * Disables all search indexing for this application. If you are
27
+ * building an unauthenticated app, you probably want to remove
28
+ * this component, or update it to control how your site is indexed
29
+ * by search engines.
30
+ */}
31
+ <SearchRobots index={false} follow={false} />
32
+ </>
33
+ );
34
+ }
@@ -1 +1 @@
1
- export {HTML} from './html/HTML.tsx';
1
+ export {Head} from './html/Head.tsx';
@@ -22,10 +22,10 @@
22
22
  "@trpc/client": "next",
23
23
  "@trpc/react-query": "next",
24
24
  "@trpc/server": "next",
25
- "jsdom": "^24.0.0",
26
- "preact": "^10.21.0",
27
- "react": "npm:@quilted/react@^18.2.0",
28
- "react-dom": "npm:@quilted/react-dom@^18.2.0",
25
+ "jsdom": "^26.0.0",
26
+ "preact": "^10.26.0",
27
+ "react": "npm:@quilted/react@^19.0.0",
28
+ "react-dom": "npm:@quilted/react-dom@^19.0.0",
29
29
  "zod": "^3.22.0"
30
30
  },
31
31
  "sideEffects": [
@@ -1,5 +1,16 @@
1
1
  import '@quilted/quilt/globals';
2
+
2
3
  import {RequestRouter} from '@quilted/quilt/request-router';
4
+ import {Router} from '@quilted/quilt/navigation';
5
+ import {
6
+ renderAppToHTMLResponse,
7
+ cacheControlHeader,
8
+ contentSecurityPolicyHeader,
9
+ permissionsPolicyHeader,
10
+ strictTransportSecurityHeader,
11
+ } from '@quilted/quilt/server';
12
+
13
+ import Env from 'quilt:module/env';
3
14
  import {BrowserAssets} from 'quilt:module/assets';
4
15
 
5
16
  import {createDirectClient} from '@quilted/trpc/server';
@@ -27,13 +38,10 @@ router.any(
27
38
 
28
39
  // For all GET requests, render our React application.
29
40
  router.get(async (request) => {
30
- const [{App}, {renderToResponse}, {Router}, {QueryClient}] =
31
- await Promise.all([
32
- import('./App.tsx'),
33
- import('@quilted/quilt/server'),
34
- import('@quilted/quilt/navigation'),
35
- import('@tanstack/react-query'),
36
- ]);
41
+ const [{App}, {QueryClient}] = await Promise.all([
42
+ import('./App.tsx'),
43
+ import('@tanstack/react-query'),
44
+ ]);
37
45
 
38
46
  const context = {
39
47
  router: new Router(request.url),
@@ -41,9 +49,86 @@ router.get(async (request) => {
41
49
  queryClient: new QueryClient(),
42
50
  } satisfies AppContext;
43
51
 
44
- const response = await renderToResponse(<App context={context} />, {
52
+ const isHttps = request.url.startsWith('https://');
53
+
54
+ const response = await renderAppToHTMLResponse(<App context={context} />, {
45
55
  request,
46
56
  assets,
57
+ headers: {
58
+ // Controls how much information about the current page is included in
59
+ // requests (through the `Referer` header). The default value
60
+ // (strict-origin-when-cross-origin) means that only the origin is included
61
+ // for cross-origin requests, while the origin, path, and querystring
62
+ // are included for same-origin requests.
63
+ //
64
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
65
+ 'Referrer-Policy': 'strict-origin-when-cross-origin',
66
+
67
+ // Disables the cache for this page, which is generally the best option
68
+ // when dealing with authenticated content. If your site doesn't have
69
+ // authentication, or you have a better cache policy that works for your
70
+ // app or deployment, make sure to update this component accordingly!
71
+ //
72
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
73
+ 'Cache-Control': cacheControlHeader({
74
+ cache: false,
75
+ }),
76
+
77
+ // Sets a strict content security policy for this page. If you load
78
+ // assets from other origins, or want to allow some more dangerous
79
+ // resource loading techniques like `eval`, you can change the
80
+ // `defaultSources` to be less restrictive, or add additional items
81
+ // to the allowlist for more specific directives.
82
+ //
83
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
84
+ 'Content-Security-Policy': contentSecurityPolicyHeader({
85
+ // By default, only allow sources from the page's origin.
86
+ defaultSources: ["'self'"],
87
+ // In development, allow connections to local websockets for hot reloading.
88
+ connectSources:
89
+ Env.MODE === 'development'
90
+ ? ["'self'", `${isHttps ? 'ws' : 'wss'}://localhost:*`]
91
+ : undefined,
92
+ // Includes `'unsafe-inline'` because CSS is often necessary in development,
93
+ // and can be difficult to avoid in production.
94
+ styleSources: ["'self'", "'unsafe-inline'"],
95
+ // Includes `data:` so that an inline image can be used for the favicon.
96
+ // If you do not use the `emoji` or `blank` favicons in your app, and you
97
+ // do not load any other images as data URIs, you can remove this directive.
98
+ imageSources: ["'self'", 'data:'],
99
+ // Don't allow this page to be rendered as a frame from a different origin.
100
+ frameAncestors: false,
101
+ // Ensure that all requests made by this page are made over https, unless
102
+ // it is being served over http (typically, during local development)
103
+ upgradeInsecureRequests: isHttps,
104
+ }),
105
+
106
+ // Sets a strict permissions policy for this page, which limits access
107
+ // to some native browser features.
108
+ //
109
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
110
+ 'Permissions-Policy': permissionsPolicyHeader({
111
+ // Disables Google's Federated Learning of Cohorts ("FLoC") tracking initiative.
112
+ // @see https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
113
+ interestCohort: false,
114
+ // Don't use synchronous XHRs!
115
+ // @see https://featurepolicy.info/policies/sync-xhr
116
+ syncXhr: false,
117
+ // Disables access to a few device APIs that are infrequently used
118
+ // and prone to abuse. If your application uses these APIs intentionally,
119
+ // feel free to remove the prop, or pass an array containing the origins
120
+ // that should be allowed to use this feature (e.g., `['self']` to allow
121
+ // only the main page's origin).
122
+ camera: false,
123
+ microphone: false,
124
+ geolocation: false,
125
+ }),
126
+
127
+ // Instructs browsers to only load this page over HTTPS.
128
+ //
129
+ // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
130
+ 'Strict-Transport-Security': strictTransportSecurityHeader(),
131
+ },
47
132
  });
48
133
 
49
134
  return response;