@cardstack/boxel-cli 0.9.0 → 0.10.0-unstable.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (995) hide show
  1. package/README.md +12 -0
  2. package/bundled-test-harness/assets/account-switch-failed-GCSVbJML.js +23 -0
  3. package/bundled-test-harness/assets/account-switch-failed-GsWni_Gk.css +18 -0
  4. package/bundled-test-harness/assets/account-switch-failed-test-CdZWNths.js +45 -0
  5. package/bundled-test-harness/assets/add-workspace-c7L50Gx8.js +141 -0
  6. package/bundled-test-harness/assets/add-workspace-test-BZxHa6Pe.js +72 -0
  7. package/bundled-test-harness/assets/advanced-color-picker-0pGF-3WG.js +504 -0
  8. package/bundled-test-harness/assets/advanced-color-picker-pbO4HWc_.js +2 -0
  9. package/bundled-test-harness/assets/ai-assistant-test-Dnm4o9vK.js +2211 -0
  10. package/bundled-test-harness/assets/ai-module-creation-test-C6253CMt.js +151 -0
  11. package/bundled-test-harness/assets/aibot-message-miKyGeKk.js +278 -0
  12. package/bundled-test-harness/assets/app-i8pGdQkw.js +22855 -0
  13. package/bundled-test-harness/assets/app-zC7o6PyQ.css +2718 -0
  14. package/bundled-test-harness/assets/audio-file-def-DHnydP0t.js +133 -0
  15. package/bundled-test-harness/assets/auth-container-BP2gSoo4.css +51 -0
  16. package/bundled-test-harness/assets/auth-container-DN94iVfX.js +24 -0
  17. package/bundled-test-harness/assets/avif-meta-extractor-Bo5zRX1V.js +162 -0
  18. package/bundled-test-harness/assets/base64-image-B0RYxzHT.js +2 -0
  19. package/bundled-test-harness/assets/base64-image-Bxjqdwew.js +262 -0
  20. package/bundled-test-harness/assets/big-integer-7RLj5_7H.js +89 -0
  21. package/bundled-test-harness/assets/big-integer-C9sJxKVy.js +2 -0
  22. package/bundled-test-harness/assets/binary-upload-dedupe-test-DZo3EaV0.js +308 -0
  23. package/bundled-test-harness/assets/boolean-CcKPYUph.js +94 -0
  24. package/bundled-test-harness/assets/boolean-DvsSmtM7.js +2 -0
  25. package/bundled-test-harness/assets/brand-functional-palette-KpVSY2Sa.js +137 -0
  26. package/bundled-test-harness/assets/brand-logo-DDiOec0t.js +295 -0
  27. package/bundled-test-harness/assets/broken-link-template-test-DAngUbFJ.js +192 -0
  28. package/bundled-test-harness/assets/bundled-base-C_lumba6.js +254 -0
  29. package/bundled-test-harness/assets/bundled-base-modules-test-CSF7Rl4Z.js +54 -0
  30. package/bundled-test-harness/assets/buried-stack-item-scroll-test-B0J_EP88.js +236 -0
  31. package/bundled-test-harness/assets/bxl-expression-test-Dej7WgI6.js +250 -0
  32. package/bundled-test-harness/assets/can-invoke-test-elyUcOKT.js +401 -0
  33. package/bundled-test-harness/assets/card-api-CjWXCkqh.js +8 -0
  34. package/bundled-test-harness/assets/card-api-Dzje0smT.js +4393 -0
  35. package/bundled-test-harness/assets/card-api-test-DA8d4Ooc.js +198 -0
  36. package/bundled-test-harness/assets/card-basics-test-mp1Odo-l.js +5364 -0
  37. package/bundled-test-harness/assets/card-chooser-paging-test-y8OfboYd.js +235 -0
  38. package/bundled-test-harness/assets/card-chooser-test-nmg2zkDj.js +393 -0
  39. package/bundled-test-harness/assets/card-collection-BXiO3i7R.js +118 -0
  40. package/bundled-test-harness/assets/card-context-search-results-Dbhn7lvW.js +30 -0
  41. package/bundled-test-harness/assets/card-context-search-results-test-DVXT-YC5.js +184 -0
  42. package/bundled-test-harness/assets/card-def-field-def-relationships-test-mX4rxrtO.js +562 -0
  43. package/bundled-test-harness/assets/card-delete-test-BxFsqFnX.js +466 -0
  44. package/bundled-test-harness/assets/card-error-C-7hjxu9.js +72 -0
  45. package/bundled-test-harness/assets/card-error-awaiting-index-test-BvfY2eaW.js +53 -0
  46. package/bundled-test-harness/assets/card-error-detail-nMwopDir.js +271 -0
  47. package/bundled-test-harness/assets/card-info-CTFxdohf.js +2 -0
  48. package/bundled-test-harness/assets/card-list-B9QrkJ97.js +2 -0
  49. package/bundled-test-harness/assets/card-list-XbwLCXZS.js +202 -0
  50. package/bundled-test-harness/assets/card-resource-JGLjQUy6.js +86 -0
  51. package/bundled-test-harness/assets/cards-grid-CWG41hZE.js +344 -0
  52. package/bundled-test-harness/assets/cards-grid-DSpX99p6.js +2 -0
  53. package/bundled-test-harness/assets/cards-grid-layout-Bht0LwZy.js +2 -0
  54. package/bundled-test-harness/assets/cards-grid-layout-CdpKlHUb.js +111 -0
  55. package/bundled-test-harness/assets/check-correctness-test-C4BrUeKA.js +554 -0
  56. package/bundled-test-harness/assets/clip-BEVvLrXx.js +2 -0
  57. package/bundled-test-harness/assets/clip-CoB714qX.js +92 -0
  58. package/bundled-test-harness/assets/code-ref-C2uguisI.js +2 -0
  59. package/bundled-test-harness/assets/code-ref-Cy7sV5a4.js +138 -0
  60. package/bundled-test-harness/assets/code-submode-availability-test-BsA_Ul01.js +198 -0
  61. package/bundled-test-harness/assets/code-submode-test-DkBhpEPB.js +1839 -0
  62. package/bundled-test-harness/assets/codeblocks-test-B1eZ2_JF.js +418 -0
  63. package/bundled-test-harness/assets/codemirror-editor-C6pxSm5y.js +2 -0
  64. package/bundled-test-harness/assets/codemirror-editor-DzM46Cd8.js +701 -0
  65. package/bundled-test-harness/assets/codemirror-embed-toolbar-test-BemP-ZdG.js +366 -0
  66. package/bundled-test-harness/assets/color-C-jGNFWZ.js +2 -0
  67. package/bundled-test-harness/assets/color-field-test-DPIRaBec.js +212 -0
  68. package/bundled-test-harness/assets/color-picker-field-Bv4IjS-d.js +139 -0
  69. package/bundled-test-harness/assets/color-picker-field-D1bYCQIg.js +2 -0
  70. package/bundled-test-harness/assets/color-wheel-picker-IIaCQplL.js +283 -0
  71. package/bundled-test-harness/assets/color-wheel-picker-Kw-UN3kV.js +2 -0
  72. package/bundled-test-harness/assets/color-zzCBneih.js +65 -0
  73. package/bundled-test-harness/assets/command-data-BMBtjT1E.js +95 -0
  74. package/bundled-test-harness/assets/command-data-BXC5Z0oA.js +2 -0
  75. package/bundled-test-harness/assets/compaction-test-CxUKnxlQ.js +150 -0
  76. package/bundled-test-harness/assets/components-Ct_agx0G.js +14294 -0
  77. package/bundled-test-harness/assets/computed-test-C-lpGQQ3.js +1320 -0
  78. package/bundled-test-harness/assets/container-BdPu8rvc.css +5565 -0
  79. package/bundled-test-harness/assets/container-Dj-5prh9.js +11288 -0
  80. package/bundled-test-harness/assets/contains-many-component-CAWqzX8W.js +2 -0
  81. package/bundled-test-harness/assets/contrast-checker-addon-BTLD7oMx.js +2 -0
  82. package/bundled-test-harness/assets/contrast-checker-addon-DBzizR04.js +71 -0
  83. package/bundled-test-harness/assets/convert-to-class-name-test-zZuKxYvF.js +17 -0
  84. package/bundled-test-harness/assets/coordinate-Bw8va6tO.js +48 -0
  85. package/bundled-test-harness/assets/copy-file-to-realm-test-DtCKPzqj.js +148 -0
  86. package/bundled-test-harness/assets/country-B_tWpLlO.js +199 -0
  87. package/bundled-test-harness/assets/create-file-modal-D-VPyEYp.js +570 -0
  88. package/bundled-test-harness/assets/create-listing-modal-test-hyLkQY0u.js +273 -0
  89. package/bundled-test-harness/assets/create-listing-pr-request-test-rjWFA_5S.js +117 -0
  90. package/bundled-test-harness/assets/create-spec-test-HKIxZGxK.js +256 -0
  91. package/bundled-test-harness/assets/create-specs-9-ELVyJP.js +215 -0
  92. package/bundled-test-harness/assets/create-submission-workflow-test-DNZrbRX8.js +132 -0
  93. package/bundled-test-harness/assets/credential-fields-test-xPEdA911.js +157 -0
  94. package/bundled-test-harness/assets/css-value-Du3HL39X.js +48 -0
  95. package/bundled-test-harness/assets/csv-file-def-EHRmilrp.js +277 -0
  96. package/bundled-test-harness/assets/currency-y6ZCHIqG.js +134 -0
  97. package/bundled-test-harness/assets/date-B27PrSFT.js +183 -0
  98. package/bundled-test-harness/assets/date-CiP5Eb9i.js +2 -0
  99. package/bundled-test-harness/assets/date-time-fields-test-Clf5vxRW.js +359 -0
  100. package/bundled-test-harness/assets/datetime-BEbR9YgU.js +201 -0
  101. package/bundled-test-harness/assets/datetime-DPnrt1wl.js +2 -0
  102. package/bundled-test-harness/assets/datetime-stamp-AuT7F7qn.js +2 -0
  103. package/bundled-test-harness/assets/datetime-stamp-CGwP2P3f.js +81 -0
  104. package/bundled-test-harness/assets/day-BFLxZ9bQ.js +2 -0
  105. package/bundled-test-harness/assets/day-CQoEkqgE.js +113 -0
  106. package/bundled-test-harness/assets/debug-message-test-CzgOpfcI.js +117 -0
  107. package/bundled-test-harness/assets/dist-B-fYvxfL.js +389 -0
  108. package/bundled-test-harness/assets/dist-C2IXvIKX.js +323 -0
  109. package/bundled-test-harness/assets/dist-CdNZu43l.js +1710 -0
  110. package/bundled-test-harness/assets/docx-file-def-BQMw460_.js +60 -0
  111. package/bundled-test-harness/assets/docx-meta-extractor-DBlmH_kV.js +60 -0
  112. package/bundled-test-harness/assets/docx-meta-extractor-Dw4gZ0ae.js +2 -0
  113. package/bundled-test-harness/assets/duration-B0SnEiw1.js +184 -0
  114. package/bundled-test-harness/assets/duration-DbjJTFeA.js +2 -0
  115. package/bundled-test-harness/assets/email-C-8cyWiQ.js +80 -0
  116. package/bundled-test-harness/assets/email-field-test-BOBmvQqx.js +75 -0
  117. package/bundled-test-harness/assets/email-xUgCst-p.js +2 -0
  118. package/bundled-test-harness/assets/enum-BWiCyJlu.js +167 -0
  119. package/bundled-test-harness/assets/enum-CzYjivhO.js +2 -0
  120. package/bundled-test-harness/assets/enum-field-test-Bea9EsQR.js +953 -0
  121. package/bundled-test-harness/assets/error-display-test-Cbl2D_0c.js +343 -0
  122. package/bundled-test-harness/assets/ethereum-address-Bw_J05bD.js +78 -0
  123. package/bundled-test-harness/assets/ethereum-address-C9wHMBt3.js +2 -0
  124. package/bundled-test-harness/assets/expiration-warning-BHcJEjZt.js +90 -0
  125. package/bundled-test-harness/assets/expiration-warning-_G8SKZd0.js +2 -0
  126. package/bundled-test-harness/assets/externals-CKblKBo1.js +4393 -0
  127. package/bundled-test-harness/assets/fallback-banner-BqCrvTDt.js +24 -0
  128. package/bundled-test-harness/assets/fallback-banner-live-delete-test-D_AYMvf6.js +207 -0
  129. package/bundled-test-harness/assets/fallback-banner-test-B8Ne9a5g.js +225 -0
  130. package/bundled-test-harness/assets/fallback-banner-test-C7oaSxd1.js +53 -0
  131. package/bundled-test-harness/assets/fallback-models-test-DY-PvU9k.js +161 -0
  132. package/bundled-test-harness/assets/field-component-Bj8YthPE.js +2 -0
  133. package/bundled-test-harness/assets/field-configuration-test-B5LztQ47.js +548 -0
  134. package/bundled-test-harness/assets/field-edit-Cx_haspD.js +36 -0
  135. package/bundled-test-harness/assets/field-edit-DQZWUz3F.js +2 -0
  136. package/bundled-test-harness/assets/field-markdown-domain-test-DnqK3CrE.js +616 -0
  137. package/bundled-test-harness/assets/field-markdown-oversize-test-BEpbXIvl.js +88 -0
  138. package/bundled-test-harness/assets/field-markdown-primitives-test-BDORWoOk.js +365 -0
  139. package/bundled-test-harness/assets/field-markdown-specialized-test-BmIzadYq.js +534 -0
  140. package/bundled-test-harness/assets/field-test-helpers-CRF9-jFw.js +45 -0
  141. package/bundled-test-harness/assets/file-api-DPMJghBY.js +7 -0
  142. package/bundled-test-harness/assets/file-attachment-test-DFLXg3xV.js +796 -0
  143. package/bundled-test-harness/assets/file-chooser-panel-test-B4DzCWkt.js +153 -0
  144. package/bundled-test-harness/assets/file-chooser-test-DpjOWgpB.js +504 -0
  145. package/bundled-test-harness/assets/file-def-edit-Bstl7Kkl.js +2 -0
  146. package/bundled-test-harness/assets/file-def-edit-C1dzJxmQ.js +26 -0
  147. package/bundled-test-harness/assets/file-def-embedded-CUy4G7Vc.js +2 -0
  148. package/bundled-test-harness/assets/file-def-embedded-DJs6P5t0.js +38 -0
  149. package/bundled-test-harness/assets/file-def-fitted-BlrBFfLh.js +38 -0
  150. package/bundled-test-harness/assets/file-def-fitted-Bo5Qfkyf.js +2 -0
  151. package/bundled-test-harness/assets/file-def-isolated-BsHydanv.js +38 -0
  152. package/bundled-test-harness/assets/file-def-isolated-Dp-Lc99-.js +2 -0
  153. package/bundled-test-harness/assets/file-def-serialization-test-CISKpt_o.js +89 -0
  154. package/bundled-test-harness/assets/file-menu-items-7_ltrFZq.js +117 -0
  155. package/bundled-test-harness/assets/file-menu-items-BnRG9ydE.js +2 -0
  156. package/bundled-test-harness/assets/file-preview-stage-CV3qZpiK.js +72 -0
  157. package/bundled-test-harness/assets/file-preview-stage-DTA5X8rX.js +2 -0
  158. package/bundled-test-harness/assets/file-shell-embedded-BpmiVzIG.js +2 -0
  159. package/bundled-test-harness/assets/file-shell-embedded-CEv0-6OE.js +68 -0
  160. package/bundled-test-harness/assets/file-shell-fitted-C6k3GnMc.js +2 -0
  161. package/bundled-test-harness/assets/file-shell-fitted-iSTg3PJa.js +98 -0
  162. package/bundled-test-harness/assets/file-shell-isolated-C-pEod2J.js +195 -0
  163. package/bundled-test-harness/assets/file-shell-isolated-DI9oU7ix.js +2 -0
  164. package/bundled-test-harness/assets/file-tree-from-index-BtOOMqnb.js +151 -0
  165. package/bundled-test-harness/assets/file-tree-from-index-test-T8w3hPw_.js +96 -0
  166. package/bundled-test-harness/assets/film-5n9_gRqZ.js +4074 -0
  167. package/bundled-test-harness/assets/film-Ca2Vzlfu.js +13 -0
  168. package/bundled-test-harness/assets/film-DEvhBbBu.js +2 -0
  169. package/bundled-test-harness/assets/fitted-6OGuHgoU.js +2 -0
  170. package/bundled-test-harness/assets/fitted-B2l1jlSp.js +34 -0
  171. package/bundled-test-harness/assets/flac-meta-extractor-BoJqvmDC.js +99 -0
  172. package/bundled-test-harness/assets/font-file-def-Czzt5paT.js +64 -0
  173. package/bundled-test-harness/assets/font-meta-extractor-DQYT_e5b.js +2 -0
  174. package/bundled-test-harness/assets/font-meta-extractor-IHD-pG8V.js +303 -0
  175. package/bundled-test-harness/assets/formatted-aibot-message-test-Djsl8RzE.js +109 -0
  176. package/bundled-test-harness/assets/from-elsewhere-BXcLYxxu.js +131 -0
  177. package/bundled-test-harness/assets/frontmatter-field-CciolgL3.js +41 -0
  178. package/bundled-test-harness/assets/garbage-collection-test-BTOLAfB6.js +403 -0
  179. package/bundled-test-harness/assets/gauge-C1loqGq3.js +2 -0
  180. package/bundled-test-harness/assets/gauge-u8dxl90d.js +106 -0
  181. package/bundled-test-harness/assets/general-test-Cd5WtVvd.js +926 -0
  182. package/bundled-test-harness/assets/get-relationship-membership-state-test-DJAuhOVM.js +1308 -0
  183. package/bundled-test-harness/assets/gif-meta-extractor-tSaPtuYW.js +114 -0
  184. package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-DNSy5l59.js +160 -0
  185. package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-B6BbQxYq.js +74 -0
  186. package/bundled-test-harness/assets/helper-m6jA5HmU.js +478 -0
  187. package/bundled-test-harness/assets/host-submode-test-CsgdksBi.js +1243 -0
  188. package/bundled-test-harness/assets/html-file-def-yKtdMSa-.js +82 -0
  189. package/bundled-test-harness/assets/hydratable-card-CxNfbqly.js +147 -0
  190. package/bundled-test-harness/assets/hydratable-card-test-NJ4CI4ey.js +426 -0
  191. package/bundled-test-harness/assets/icons-B3SAtRoj.js +894 -0
  192. package/bundled-test-harness/assets/image-file-def-B0rpS3Yy.js +3 -0
  193. package/bundled-test-harness/assets/image-file-def-DUFmjNL8.js +65 -0
  194. package/bundled-test-harness/assets/image-olOUqgMQ.js +47 -0
  195. package/bundled-test-harness/assets/index-changes-test-D7OE-99k.js +367 -0
  196. package/bundled-test-harness/assets/index-query-engine-test-BBKqgSmg.js +2593 -0
  197. package/bundled-test-harness/assets/inspector-test-DV6Ms2uz.js +1930 -0
  198. package/bundled-test-harness/assets/instance-filter-matcher-test-Bs4kf7E8.js +788 -0
  199. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DIfgRhIN.js +475 -0
  200. package/bundled-test-harness/assets/interact-submode-setup-D4M_e580.js +566 -0
  201. package/bundled-test-harness/assets/is-component-declaration-test-jPGRTVh1.js +50 -0
  202. package/bundled-test-harness/assets/iso-bmff-DHtkSbQM.js +205 -0
  203. package/bundled-test-harness/assets/iso-bmff-zmOHoSVg.js +2 -0
  204. package/bundled-test-harness/assets/isolated-and-edit-BAnwcK1T.js +2 -0
  205. package/bundled-test-harness/assets/job-priority-header-test-7j2f3Dtl.js +81 -0
  206. package/bundled-test-harness/assets/job-scoped-instance-residency-test-DPzVQUL3.js +103 -0
  207. package/bundled-test-harness/assets/join-the-community-Ft5fjeIA.js +86 -0
  208. package/bundled-test-harness/assets/jpg-meta-extractor-Dsq6rZ8F.js +88 -0
  209. package/bundled-test-harness/assets/json-field-CxOZvp3k.js +19 -0
  210. package/bundled-test-harness/assets/json-field-ojdwGD6T.js +2 -0
  211. package/bundled-test-harness/assets/json-file-def-Da_5-zSM.js +298 -0
  212. package/bundled-test-harness/assets/last-modified-date-BnyJsc04.js +43 -0
  213. package/bundled-test-harness/assets/last-modified-date-test-DFl2mo1B.js +28 -0
  214. package/bundled-test-harness/assets/links-to-editor-DO24-71w.js +2 -0
  215. package/bundled-test-harness/assets/links-to-many-component-C7DabwAY.js +2 -0
  216. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-D4lDhvnQ.js +398 -0
  217. package/bundled-test-harness/assets/linksto-error-sentinel-test-oWgDz00K.js +238 -0
  218. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-CpSl7zJ7.js +354 -0
  219. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-DJY3J8Xl.js +303 -0
  220. package/bundled-test-harness/assets/linksto-sentinel-reload-test-BxzfoONe.js +197 -0
  221. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DyE99km_.js +260 -0
  222. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-dcWAAgxt.js +196 -0
  223. package/bundled-test-harness/assets/llm-model-DrswiczZ.js +64 -0
  224. package/bundled-test-harness/assets/login-C-EIG0-Q.css +543 -0
  225. package/bundled-test-harness/assets/login-CNeL-9IC.js +408 -0
  226. package/bundled-test-harness/assets/login-error-text-test-CEH2tjNP.js +51 -0
  227. package/bundled-test-harness/assets/login-test-BpMx7qwV.js +246 -0
  228. package/bundled-test-harness/assets/m4a-meta-extractor-BJkMHUIK.js +204 -0
  229. package/bundled-test-harness/assets/main-BaUgfpPE.js +5 -0
  230. package/bundled-test-harness/assets/markdown-ByEGbwov.js +7 -0
  231. package/bundled-test-harness/assets/markdown-KJzgTg-A.js +2 -0
  232. package/bundled-test-harness/assets/markdown-editor-mode-select-BUGPXaSE.js +2 -0
  233. package/bundled-test-harness/assets/markdown-editor-mode-select-DBk8dG0O.js +54 -0
  234. package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-BIlEmna9.js +470 -0
  235. package/bundled-test-harness/assets/markdown-embed-preview-pane-test-B6rscKpk.js +447 -0
  236. package/bundled-test-harness/assets/markdown-embed-preview-test-CTQw1wq-.js +368 -0
  237. package/bundled-test-harness/assets/markdown-fallback-BVsco6gJ.js +2 -0
  238. package/bundled-test-harness/assets/markdown-fallback-test-C_CIFEzH.js +316 -0
  239. package/bundled-test-harness/assets/markdown-highlighting-test-D6YvywF5.js +244 -0
  240. package/bundled-test-harness/assets/markdown-preview-1TSMSUv0.js +64 -0
  241. package/bundled-test-harness/assets/markdown-preview-jbuUjLoD.js +72 -0
  242. package/bundled-test-harness/assets/markdown-preview-test-zuU5uoA_.js +238 -0
  243. package/bundled-test-harness/assets/markdown-skill-frontmatter-test-CoicGRkb.js +146 -0
  244. package/bundled-test-harness/assets/menu-items-DZ_uOoYu.js +2 -0
  245. package/bundled-test-harness/assets/message-tool-test-K6LgTq5d.js +33 -0
  246. package/bundled-test-harness/assets/metadata-fields-WiOuUCDl.js +1415 -0
  247. package/bundled-test-harness/assets/metadata-fields-iu5AfQp3.js +2 -0
  248. package/bundled-test-harness/assets/midi-audio-def-CD2-4Wjx.js +52 -0
  249. package/bundled-test-harness/assets/midi-meta-extractor-CE3sLiEV.js +284 -0
  250. package/bundled-test-harness/assets/midi-meta-extractor-O7c8LHYV.js +2 -0
  251. package/bundled-test-harness/assets/migrate-skill-test-Beh-AeSN.js +161 -0
  252. package/bundled-test-harness/assets/mini-BNXINKKF.js +85 -0
  253. package/bundled-test-harness/assets/mini-C43Q4BWp.js +1519 -0
  254. package/bundled-test-harness/assets/mini-card-chooser-test-B1GMp-31.js +272 -0
  255. package/bundled-test-harness/assets/mini-file-chooser-test-CbI1vrQn.js +201 -0
  256. package/bundled-test-harness/assets/missing-template-BPhJRbDs.js +48 -0
  257. package/bundled-test-harness/assets/missing-template-DP-Pi-HQ.js +2 -0
  258. package/bundled-test-harness/assets/modal-KpPz2f8x.js +322 -0
  259. package/bundled-test-harness/assets/modal-container-0Efz_h2z.js +40 -0
  260. package/bundled-test-harness/assets/model-cost-tier-test-D-5VSjh6.js +173 -0
  261. package/bundled-test-harness/assets/module-contents-service-BRkTETb6.js +256 -0
  262. package/bundled-test-harness/assets/moment-Cln59YUK.js +3474 -0
  263. package/bundled-test-harness/assets/monaco-AbHCoDJY.js +143 -0
  264. package/bundled-test-harness/assets/monaco-test-DCPi18sy.js +100 -0
  265. package/bundled-test-harness/assets/monaco-test-waiter-lvFEYpFj.js +190 -0
  266. package/bundled-test-harness/assets/month-1eUIsvWN.js +2 -0
  267. package/bundled-test-harness/assets/month-BeUdWMWQ.js +123 -0
  268. package/bundled-test-harness/assets/month-day-Bbsd8YbR.js +192 -0
  269. package/bundled-test-harness/assets/month-day-Dks5STJu.js +2 -0
  270. package/bundled-test-harness/assets/month-year-pL_rpUhX.js +2 -0
  271. package/bundled-test-harness/assets/month-year-wH_YnYgL.js +93 -0
  272. package/bundled-test-harness/assets/mp3-meta-extractor-C3u34UHM.js +476 -0
  273. package/bundled-test-harness/assets/mp4-meta-extractor-Bj3F7dxs.js +188 -0
  274. package/bundled-test-harness/assets/multiple-stacks-test-mkNdTUMI.js +208 -0
  275. package/bundled-test-harness/assets/nested-query-field-render-test-BQLn3wg9.js +249 -0
  276. package/bundled-test-harness/assets/no-stacks-test-DpwZQAJ-.js +48 -0
  277. package/bundled-test-harness/assets/number-DZa-fHpu.js +151 -0
  278. package/bundled-test-harness/assets/number-Dvua76YP.js +3 -0
  279. package/bundled-test-harness/assets/number-field-test-BiaH2eaB.js +184 -0
  280. package/bundled-test-harness/assets/number-input-D5nDYDkK.js +82 -0
  281. package/bundled-test-harness/assets/office-extract-JzYva33g.js +27 -0
  282. package/bundled-test-harness/assets/office-extract-XMpsyYRh.js +2 -0
  283. package/bundled-test-harness/assets/ogg-meta-extractor-DJosZ9LA.js +225 -0
  284. package/bundled-test-harness/assets/on-key-BBVkS8Bi.js +472 -0
  285. package/bundled-test-harness/assets/ooxml-BlAE2w4d.js +172 -0
  286. package/bundled-test-harness/assets/ooxml-D-p8OmuM.js +2 -0
  287. package/bundled-test-harness/assets/open-image-in-new-tab-test-DWBU5pw9.js +52 -0
  288. package/bundled-test-harness/assets/operation-lowering-test-nzqprueU.js +2812 -0
  289. package/bundled-test-harness/assets/operations-CPvfTuY3.js +766 -0
  290. package/bundled-test-harness/assets/operations-invocation-test-C75T6zn3.js +523 -0
  291. package/bundled-test-harness/assets/operations-query-test-BoCszQEW.js +459 -0
  292. package/bundled-test-harness/assets/operations-test-79ipSnpM.js +2518 -0
  293. package/bundled-test-harness/assets/operations-x3Aw2Nky.js +3 -0
  294. package/bundled-test-harness/assets/operator-mode-acceptance-test-jjsYtt96.js +1188 -0
  295. package/bundled-test-harness/assets/operator-mode-card-chooser-test-hZP9gEQK.js +1036 -0
  296. package/bundled-test-harness/assets/operator-mode-links-test-DN16SuIx.js +793 -0
  297. package/bundled-test-harness/assets/operator-mode-state-service-gwiTSiWX.js +1275 -0
  298. package/bundled-test-harness/assets/operator-mode-state-service-test-Dt2qnKKP.js +206 -0
  299. package/bundled-test-harness/assets/operator-mode-test-BZnnxO9q.js +683 -0
  300. package/bundled-test-harness/assets/operator-mode-ui-test-O--qEo-y.js +1027 -0
  301. package/bundled-test-harness/assets/overlay-menu-items-test-Bl2k0aAa.js +317 -0
  302. package/bundled-test-harness/assets/overlays-CdN_JokA.js +270 -0
  303. package/bundled-test-harness/assets/overlays-clip-test-DpbR1ZTz.js +91 -0
  304. package/bundled-test-harness/assets/overlays-detached-element-test-cLgEGvMs.js +56 -0
  305. package/bundled-test-harness/assets/pane-PYdezM7g.js +330 -0
  306. package/bundled-test-harness/assets/panel-7FDqkxrr.js +474 -0
  307. package/bundled-test-harness/assets/panel-C3E0s49q.js +3540 -0
  308. package/bundled-test-harness/assets/past-sessions-test-BsjEeoze.js +321 -0
  309. package/bundled-test-harness/assets/patch-fields-test-CsixJmSr.js +1014 -0
  310. package/bundled-test-harness/assets/patch-instance-test-CBDgTi0L.js +348 -0
  311. package/bundled-test-harness/assets/pdf-file-def-9VNjnqDa.js +76 -0
  312. package/bundled-test-harness/assets/pdf-meta-extractor-BF4e5kMR.js +156 -0
  313. package/bundled-test-harness/assets/pdf-meta-extractor-D8Bxh2cc.js +2 -0
  314. package/bundled-test-harness/assets/pdf-viewer-Bu413sN8.js +112 -0
  315. package/bundled-test-harness/assets/pdf-viewer-GKDi_xmf.js +2 -0
  316. package/bundled-test-harness/assets/percentage-TOr6qK2T.js +84 -0
  317. package/bundled-test-harness/assets/permission-checking-realm-test-BRNVYszm.js +306 -0
  318. package/bundled-test-harness/assets/phone-number-D5SR8nWu.js +236 -0
  319. package/bundled-test-harness/assets/phone-number-field-test-DffwtqGd.js +73 -0
  320. package/bundled-test-harness/assets/phone-number-hf_xIVGQ.js +2 -0
  321. package/bundled-test-harness/assets/plate-Vojc88hM.js +41 -0
  322. package/bundled-test-harness/assets/plate-dTUzEMj5.js +2 -0
  323. package/bundled-test-harness/assets/player-CmRw0uM5.js +82 -0
  324. package/bundled-test-harness/assets/player-Dt85lPZl.js +2 -0
  325. package/bundled-test-harness/assets/plural-field-components-test-DNpGuH1D.js +198 -0
  326. package/bundled-test-harness/assets/png-image-def-GY7gjqya.js +48 -0
  327. package/bundled-test-harness/assets/png-meta-extractor-4pI611re.js +2 -0
  328. package/bundled-test-harness/assets/png-meta-extractor-CHp_rpAi.js +111 -0
  329. package/bundled-test-harness/assets/policy-scoped-search-test-CipPu7tY.js +339 -0
  330. package/bundled-test-harness/assets/pptx-file-def-lBBiebvn.js +60 -0
  331. package/bundled-test-harness/assets/pptx-meta-extractor-BjJYWiOJ.js +77 -0
  332. package/bundled-test-harness/assets/pptx-meta-extractor-DbT-dPRg.js +2 -0
  333. package/bundled-test-harness/assets/prerender-persistence-block-test-ClHMVvJt.js +124 -0
  334. package/bundled-test-harness/assets/prerender-serialize-cycle-test-LdqaMTK8.js +134 -0
  335. package/bundled-test-harness/assets/preview-CYlam_aW.js +74 -0
  336. package/bundled-test-harness/assets/preview-format-CiSo4kEa.js +41 -0
  337. package/bundled-test-harness/assets/preview-format-test-MsB1TOLB.js +103 -0
  338. package/bundled-test-harness/assets/process-card-B3xBGkv1.js +2 -0
  339. package/bundled-test-harness/assets/process-card-DumVcx9E.js +114 -0
  340. package/bundled-test-harness/assets/process-card-test-C44H8yVy.js +94 -0
  341. package/bundled-test-harness/assets/profile-settings-modal-ipYzrVTz.js +708 -0
  342. package/bundled-test-harness/assets/progress-circle-DJ6WSO2E.js +95 -0
  343. package/bundled-test-harness/assets/progress-circle-q358_9Sn.js +2 -0
  344. package/bundled-test-harness/assets/quarter-BjO5DlU2.js +2 -0
  345. package/bundled-test-harness/assets/quarter-_D72FwfS.js +168 -0
  346. package/bundled-test-harness/assets/query-field-membership-status-test-CzDyfK49.js +323 -0
  347. package/bundled-test-harness/assets/query-field-page-optin-test-B-x3vsmC.js +126 -0
  348. package/bundled-test-harness/assets/query-field-schema-test-DFw6KuYv.js +231 -0
  349. package/bundled-test-harness/assets/query-field-stale-prerender-test-DSQ-cv_O.js +152 -0
  350. package/bundled-test-harness/assets/query-fields-test-DQiMFRCe.js +535 -0
  351. package/bundled-test-harness/assets/rail-CNspDFyn.js +44 -0
  352. package/bundled-test-harness/assets/rail-D2YcQ0VP.js +2 -0
  353. package/bundled-test-harness/assets/realm-82Z5RUM_.js +95 -0
  354. package/bundled-test-harness/assets/realm-config-SgrwqjRu.js +844 -0
  355. package/bundled-test-harness/assets/realm-config-policy-standing-test-C6sQNk2u.js +290 -0
  356. package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-DcYXBlvi.js +274 -0
  357. package/bundled-test-harness/assets/realm-config-settings-test-DblJv06X.js +187 -0
  358. package/bundled-test-harness/assets/realm-dropdown-CDvL8k3B.js +560 -0
  359. package/bundled-test-harness/assets/realm-et890flh.js +2 -0
  360. package/bundled-test-harness/assets/realm-field-test-pBK_x-Xw.js +100 -0
  361. package/bundled-test-harness/assets/realm-indexing-test-DSFn2F8F.js +4380 -0
  362. package/bundled-test-harness/assets/realm-policy-test-DYnLqzTS.js +1141 -0
  363. package/bundled-test-harness/assets/realm-test-DOZT2EG5.js +2363 -0
  364. package/bundled-test-harness/assets/realm-url-tooltip-qaXTjRb-.js +56 -0
  365. package/bundled-test-harness/assets/realm-url-tooltip-test-DGTEeLH9.js +78 -0
  366. package/bundled-test-harness/assets/reasoning-test-BRkhvYjr.js +234 -0
  367. package/bundled-test-harness/assets/recent-colors-addon-BreXcpg8.js +2 -0
  368. package/bundled-test-harness/assets/recent-colors-addon-CmCkbJ2_.js +61 -0
  369. package/bundled-test-harness/assets/relationship-loading-state-test-B6UGYKzG.js +290 -0
  370. package/bundled-test-harness/assets/relative-time-BjHvL023.js +2 -0
  371. package/bundled-test-harness/assets/relative-time-ChYKOMIM.js +129 -0
  372. package/bundled-test-harness/assets/remix-card-test-CpV0kKfq.js +58 -0
  373. package/bundled-test-harness/assets/rendered-markdown-CJa7IzCC.js +263 -0
  374. package/bundled-test-harness/assets/rendered-markdown-test-CVKsHS4P.js +587 -0
  375. package/bundled-test-harness/assets/resident-instance-reuse-test-jQfW1NMn.js +82 -0
  376. package/bundled-test-harness/assets/response-field-B2-daCl2.js +38 -0
  377. package/bundled-test-harness/assets/result-tile-BSg4mzbc.js +140 -0
  378. package/bundled-test-harness/assets/rich-markdown-BtP1yamM.js +2 -0
  379. package/bundled-test-harness/assets/rich-markdown-C6rQUngb.js +218 -0
  380. package/bundled-test-harness/assets/rich-markdown-field-test-9yB6ykCe.js +1647 -0
  381. package/bundled-test-harness/assets/room-C7tKd02X.js +1008 -0
  382. package/bundled-test-harness/assets/room-message-test-DsMmRYpV.js +445 -0
  383. package/bundled-test-harness/assets/room-test-golI1H61.js +95 -0
  384. package/bundled-test-harness/assets/run-realm-code-CbXk6bnK.js +1600 -0
  385. package/bundled-test-harness/assets/run-realm-code-test-B9JeesaW.js +2468 -0
  386. package/bundled-test-harness/assets/schema-generation-test-uLLGm5Vh.js +28 -0
  387. package/bundled-test-harness/assets/score-BQhCQdUP.js +2 -0
  388. package/bundled-test-harness/assets/score-CoWEzENH.js +100 -0
  389. package/bundled-test-harness/assets/scrolling-test-WHWEkKeZ.js +384 -0
  390. package/bundled-test-harness/assets/search-BkQYpQDY.js +605 -0
  391. package/bundled-test-harness/assets/search-adorn-test-CW92JPOk.js +136 -0
  392. package/bundled-test-harness/assets/search-entries-BU4w6Ymc.js +472 -0
  393. package/bundled-test-harness/assets/search-entries-result-test-9eydsDtD.js +234 -0
  394. package/bundled-test-harness/assets/search-entries-test-ByUREx0G.js +1486 -0
  395. package/bundled-test-harness/assets/search-result-header-UFkdo0Bx.js +128 -0
  396. package/bundled-test-harness/assets/search-results-DrHTuVRZ.js +266 -0
  397. package/bundled-test-harness/assets/search-results-test-krtQQM57.js +578 -0
  398. package/bundled-test-harness/assets/search-selection-menu-test-DoqSbez7.js +108 -0
  399. package/bundled-test-harness/assets/search-sheet-persistence-test-4ZPaEY-y.js +131 -0
  400. package/bundled-test-harness/assets/search-test-BYpq32RM.js +2241 -0
  401. package/bundled-test-harness/assets/searchable-BXw4T11q.js +192 -0
  402. package/bundled-test-harness/assets/searchable-CVvPDA3Q.js +2 -0
  403. package/bundled-test-harness/assets/searchable-option-test-BhLFI4ei.js +322 -0
  404. package/bundled-test-harness/assets/searchable-search-doc-test-DrNLCF73.js +1271 -0
  405. package/bundled-test-harness/assets/secure-sign-in-VNQhe0ae.js +130 -0
  406. package/bundled-test-harness/assets/secure-sign-in-Za8PX9cD.css +24 -0
  407. package/bundled-test-harness/assets/secure-sign-in-aunWHCrB.js +73 -0
  408. package/bundled-test-harness/assets/secure-sign-in-test-BcY1TcNd.js +32 -0
  409. package/bundled-test-harness/assets/secure-sign-in-test-DRdz89BT.js +245 -0
  410. package/bundled-test-harness/assets/sending-test-mbHpGZUu.js +576 -0
  411. package/bundled-test-harness/assets/serialization-rri-form-audit-test-nypV9J82.js +136 -0
  412. package/bundled-test-harness/assets/serialization-test-aLwrFv4d.js +8758 -0
  413. package/bundled-test-harness/assets/setup-Dgn0s6Zk.js +772 -0
  414. package/bundled-test-harness/assets/shared-link-target-reuse-test-D9MR2UNc.js +207 -0
  415. package/bundled-test-harness/assets/show-card-Dwfk332M.js +67 -0
  416. package/bundled-test-harness/assets/show-card-test-CRPwwJvc.js +365 -0
  417. package/bundled-test-harness/assets/show-file-DLdFPHMR.js +34 -0
  418. package/bundled-test-harness/assets/signed-capture-DUR9PohQ.js +204 -0
  419. package/bundled-test-harness/assets/signed-capture-link-test-DfTAB6OT.js +132 -0
  420. package/bundled-test-harness/assets/single-stack-test-Crr_8nti.js +652 -0
  421. package/bundled-test-harness/assets/skill-DQ00VonZ.js +3 -0
  422. package/bundled-test-harness/assets/skill-reference-LEitQV9i.js +112 -0
  423. package/bundled-test-harness/assets/skill-yZXS1VHQ.js +76 -0
  424. package/bundled-test-harness/assets/skills-test-D3-C-Dbm.js +648 -0
  425. package/bundled-test-harness/assets/slider-picker-B6AxKL2j.js +245 -0
  426. package/bundled-test-harness/assets/slider-picker-C4Tc5o-s.js +2 -0
  427. package/bundled-test-harness/assets/spec-Cl_LB6nC.js +602 -0
  428. package/bundled-test-harness/assets/spinner-BHFM7zcR.js +39 -0
  429. package/bundled-test-harness/assets/spinner-DvAvsyDT.css +21 -0
  430. package/bundled-test-harness/assets/store-BV6WX8oV.js +2205 -0
  431. package/bundled-test-harness/assets/store-module-rebuild-test-HyphFJiF.js +454 -0
  432. package/bundled-test-harness/assets/store-search-test-nUeJ5opb.js +175 -0
  433. package/bundled-test-harness/assets/store-test-BebUIJAg.js +3460 -0
  434. package/bundled-test-harness/assets/string-BHZZwNlZ.js +9 -0
  435. package/bundled-test-harness/assets/submode-switcher-D-U9cXo0.js +169 -0
  436. package/bundled-test-harness/assets/svg-meta-extractor-BsG4w2nX.js +42 -0
  437. package/bundled-test-harness/assets/swatches-picker-4vFztxHo.js +33 -0
  438. package/bundled-test-harness/assets/swatches-picker-C7RE7uJ8.js +2 -0
  439. package/bundled-test-harness/assets/switch-submode-CuA0Zfjn.js +79 -0
  440. package/bundled-test-harness/assets/switch-submode-test-i1Qic_Cp.js +168 -0
  441. package/bundled-test-harness/assets/tag-CZNs3DPN.js +105 -0
  442. package/bundled-test-harness/assets/tests-BneuP252.js +3523 -0
  443. package/bundled-test-harness/assets/text-area-DAShQQBe.js +9 -0
  444. package/bundled-test-harness/assets/text-file-def-D2Rs6nS1.js +151 -0
  445. package/bundled-test-harness/assets/text-input-validator-test-C9IG-1GZ.js +156 -0
  446. package/bundled-test-harness/assets/theme-Dm8LWaRK.js +9 -0
  447. package/bundled-test-harness/assets/theme-card-test-Cbb6tAap.js +621 -0
  448. package/bundled-test-harness/assets/theme-scheme-island-test-DOVLakx3.js +264 -0
  449. package/bundled-test-harness/assets/three-d-model-def-DWSPQGgD.js +70 -0
  450. package/bundled-test-harness/assets/time--_Txqya1.js +126 -0
  451. package/bundled-test-harness/assets/time-DKD7Bdjd.js +2 -0
  452. package/bundled-test-harness/assets/time-slots-BZaugjq_.js +2 -0
  453. package/bundled-test-harness/assets/time-slots-C85M0rWl.js +85 -0
  454. package/bundled-test-harness/assets/timeline-B3KGDm3M.js +2 -0
  455. package/bundled-test-harness/assets/timeline-BMwgaZZu.js +59 -0
  456. package/bundled-test-harness/assets/to-device-streaming-test-CMp5bFiz.js +163 -0
  457. package/bundled-test-harness/assets/token-usage-test-CXA0b8Ep.js +166 -0
  458. package/bundled-test-harness/assets/tool-field-BGLelnsr.js +94 -0
  459. package/bundled-test-harness/assets/tool-field-BOFuDDt3.js +2 -0
  460. package/bundled-test-harness/assets/tools-CTjy7Aub.js +725 -0
  461. package/bundled-test-harness/assets/tools-calling-test--JR-7AK7.js +200 -0
  462. package/bundled-test-harness/assets/tools-test-6yAW3W5I.js +2820 -0
  463. package/bundled-test-harness/assets/tools-test-DhpMUQkz.js +1624 -0
  464. package/bundled-test-harness/assets/ts-file-def-CDbf8aw2.js +159 -0
  465. package/bundled-test-harness/assets/update-room-skills-test-DoKsS_1C.js +240 -0
  466. package/bundled-test-harness/assets/url-D0ooeJxC.js +2 -0
  467. package/bundled-test-harness/assets/url-mFskVPSX.js +96 -0
  468. package/bundled-test-harness/assets/video-file-def-AcmWqzev.js +76 -0
  469. package/bundled-test-harness/assets/wav-meta-extractor-CbTLruQf.js +368 -0
  470. package/bundled-test-harness/assets/webm-meta-extractor-C9JH-CMX.js +178 -0
  471. package/bundled-test-harness/assets/webp-meta-extractor-C6sHm4J7.js +98 -0
  472. package/bundled-test-harness/assets/website-Bxuk_OmR.js +92 -0
  473. package/bundled-test-harness/assets/week-Bxssxce7.js +2 -0
  474. package/bundled-test-harness/assets/week-DQLj9974.js +111 -0
  475. package/bundled-test-harness/assets/welcome-to-boxel-BH82RsW5.js +172 -0
  476. package/bundled-test-harness/assets/workspace-DJ_s2x4g.js +614 -0
  477. package/bundled-test-harness/assets/workspace-a11y-test-BJbZNgoP.js +197 -0
  478. package/bundled-test-harness/assets/workspace-behavior-test-BLBARTfb.js +200 -0
  479. package/bundled-test-harness/assets/workspace-chooser-BpmlVrVn.js +2219 -0
  480. package/bundled-test-harness/assets/workspace-chooser-CqLR2Dzh.css +1296 -0
  481. package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-CmAVNAWC.js +36 -0
  482. package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DEfG7Uh9.js +60 -0
  483. package/bundled-test-harness/assets/workspace-delete-multiple-test-DE7Z8ooj.js +212 -0
  484. package/bundled-test-harness/assets/workspace-delete-summary-test-CwtG_zLH.js +63 -0
  485. package/bundled-test-harness/assets/workspace-timestamp-labels-test-DFAaRmJW.js +58 -0
  486. package/bundled-test-harness/assets/xlsx-file-def-DcvaRYnZ.js +60 -0
  487. package/bundled-test-harness/assets/xlsx-meta-extractor-0RlViVaf.js +101 -0
  488. package/bundled-test-harness/assets/xlsx-meta-extractor-BH30Vuem.js +2 -0
  489. package/bundled-test-harness/assets/year-B_MBk_hE.js +78 -0
  490. package/bundled-test-harness/assets/year-hSpccI9L.js +2 -0
  491. package/bundled-test-harness/assets/zip-file-def-c84iddi9.js +288 -0
  492. package/bundled-test-harness/index.html +78 -68
  493. package/bundled-test-harness/tests/index.html +78 -68
  494. package/bundled-types/host-app/components/matrix/account-switch-failed.gts +2 -2
  495. package/bundled-types/host-app/components/matrix/auth.gts +2 -2
  496. package/bundled-types/host-app/components/matrix/cli-auth.gts +7 -6
  497. package/bundled-types/host-app/components/matrix/forgot-password.gts +43 -129
  498. package/bundled-types/host-app/components/matrix/login.gts +15 -118
  499. package/bundled-types/host-app/components/matrix/register-user.gts +45 -226
  500. package/bundled-types/host-app/components/matrix/secure-sign-in.gts +235 -0
  501. package/bundled-types/host-app/components/operator-mode/container.gts +13 -1
  502. package/bundled-types/host-app/components/operator-mode/profile-info-popover.gts +1 -1
  503. package/bundled-types/host-app/config/environment.ts +1 -1
  504. package/bundled-types/host-app/lib/secure-sign-in.ts +130 -0
  505. package/bundled-types/host-app/services/matrix-service.ts +46 -0
  506. package/bundled-types/host-app/services/monaco-service.ts +0 -5
  507. package/bundled-types/host-app/utils/login-token.ts +23 -10
  508. package/dist/api.js +1 -1
  509. package/dist/index.js +289 -285
  510. package/package.json +1 -1
  511. package/src/build-program.ts +6 -2
  512. package/src/commands/profile.ts +72 -3
  513. package/src/lib/profile-manager.ts +5 -1
  514. package/src/lib/secure-session.ts +29 -0
  515. package/src/lib/sso-login.ts +94 -15
  516. package/bundled-test-harness/assets/account-switch-failed-B3pr_iC3.js +0 -32
  517. package/bundled-test-harness/assets/account-switch-failed-DTGZZo-G.css +0 -61
  518. package/bundled-test-harness/assets/account-switch-failed-test-9ENVgvlx.js +0 -45
  519. package/bundled-test-harness/assets/add-workspace-BAbk0250.js +0 -141
  520. package/bundled-test-harness/assets/add-workspace-test-ChAja_t-.js +0 -72
  521. package/bundled-test-harness/assets/advanced-color-picker-C-xBFJ2S.js +0 -504
  522. package/bundled-test-harness/assets/advanced-color-picker-bWAmCT-8.js +0 -2
  523. package/bundled-test-harness/assets/ai-assistant-test-BJ9yetuC.js +0 -2211
  524. package/bundled-test-harness/assets/ai-module-creation-test-Bw3TKS9d.js +0 -151
  525. package/bundled-test-harness/assets/aibot-message-DkgHT6eJ.js +0 -465
  526. package/bundled-test-harness/assets/app-DW5QjtRp.js +0 -22816
  527. package/bundled-test-harness/assets/app-yCDjO4mk.css +0 -2718
  528. package/bundled-test-harness/assets/audio-file-def-bJ3cXVmC.js +0 -133
  529. package/bundled-test-harness/assets/avif-meta-extractor-CrSDfYEt.js +0 -162
  530. package/bundled-test-harness/assets/base64-image-C7UBjK5W.js +0 -262
  531. package/bundled-test-harness/assets/base64-image-CjWpxROT.js +0 -2
  532. package/bundled-test-harness/assets/big-integer-BBql7oGZ.js +0 -89
  533. package/bundled-test-harness/assets/big-integer-B_TrzRy_.js +0 -2
  534. package/bundled-test-harness/assets/binary-upload-dedupe-test-BiX8kS7D.js +0 -308
  535. package/bundled-test-harness/assets/boolean-9LNUUTfw.js +0 -2
  536. package/bundled-test-harness/assets/boolean-BAmK01TF.js +0 -94
  537. package/bundled-test-harness/assets/brand-functional-palette-CFuoS-LS.js +0 -137
  538. package/bundled-test-harness/assets/brand-logo-By89eknI.js +0 -295
  539. package/bundled-test-harness/assets/broken-link-template-test-odBriDSP.js +0 -192
  540. package/bundled-test-harness/assets/bundled-base-CLQkkmN4.js +0 -254
  541. package/bundled-test-harness/assets/bundled-base-modules-test-BYrTaTwa.js +0 -54
  542. package/bundled-test-harness/assets/buried-stack-item-scroll-test-DU4bM5nd.js +0 -236
  543. package/bundled-test-harness/assets/bxl-expression-test-Cs9JaZbC.js +0 -250
  544. package/bundled-test-harness/assets/can-invoke-test-ccMc06BU.js +0 -401
  545. package/bundled-test-harness/assets/card-api-Bn65NUT0.js +0 -8
  546. package/bundled-test-harness/assets/card-api-test-COrFXu2i.js +0 -198
  547. package/bundled-test-harness/assets/card-api-u1pOrwS6.js +0 -4393
  548. package/bundled-test-harness/assets/card-basics-test-D4rn3iN-.js +0 -5364
  549. package/bundled-test-harness/assets/card-chooser-paging-test-bZhdrUXt.js +0 -235
  550. package/bundled-test-harness/assets/card-chooser-test-D9w1duob.js +0 -393
  551. package/bundled-test-harness/assets/card-collection-ClCV-__1.js +0 -118
  552. package/bundled-test-harness/assets/card-context-search-results-H_rN3Upz.js +0 -30
  553. package/bundled-test-harness/assets/card-context-search-results-test-jciyaouV.js +0 -184
  554. package/bundled-test-harness/assets/card-def-field-def-relationships-test-BVZoQzM8.js +0 -562
  555. package/bundled-test-harness/assets/card-delete-test-CuLcZFnY.js +0 -466
  556. package/bundled-test-harness/assets/card-error-DIOivSkD.js +0 -72
  557. package/bundled-test-harness/assets/card-error-awaiting-index-test-JMwcRONq.js +0 -53
  558. package/bundled-test-harness/assets/card-error-detail-96jWBx6B.js +0 -271
  559. package/bundled-test-harness/assets/card-info-BxPtwG1h.js +0 -2
  560. package/bundled-test-harness/assets/card-list-B34qY3io.js +0 -2
  561. package/bundled-test-harness/assets/card-list-BpCaKkZJ.js +0 -202
  562. package/bundled-test-harness/assets/card-resource-DcPbIwH9.js +0 -86
  563. package/bundled-test-harness/assets/cards-grid-CTN8nBT_.js +0 -344
  564. package/bundled-test-harness/assets/cards-grid-Cx44vL-M.js +0 -2
  565. package/bundled-test-harness/assets/cards-grid-layout-BdL0Uzxl.js +0 -111
  566. package/bundled-test-harness/assets/cards-grid-layout-Dn8Yb4ma.js +0 -2
  567. package/bundled-test-harness/assets/check-correctness-test-BfMV-MC0.js +0 -554
  568. package/bundled-test-harness/assets/clip-CK6mVuyN.js +0 -92
  569. package/bundled-test-harness/assets/clip-CfXD1JTr.js +0 -2
  570. package/bundled-test-harness/assets/code-ref-85Bih6Zl.js +0 -138
  571. package/bundled-test-harness/assets/code-ref-DATHaoyt.js +0 -2
  572. package/bundled-test-harness/assets/code-submode-availability-test-DLYlx0wo.js +0 -198
  573. package/bundled-test-harness/assets/code-submode-test-CDIi7MjD.js +0 -1824
  574. package/bundled-test-harness/assets/codeblocks-test-CNPyTvuv.js +0 -418
  575. package/bundled-test-harness/assets/codemirror-editor-BPOPTR-f.js +0 -2
  576. package/bundled-test-harness/assets/codemirror-editor-DPhG0pec.js +0 -701
  577. package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Dk5lFOUq.js +0 -366
  578. package/bundled-test-harness/assets/color-BxN5gRSg.js +0 -65
  579. package/bundled-test-harness/assets/color-CrunRcis.js +0 -2
  580. package/bundled-test-harness/assets/color-field-test-COjFIpXV.js +0 -212
  581. package/bundled-test-harness/assets/color-picker-field-C-GS1CIw.js +0 -139
  582. package/bundled-test-harness/assets/color-picker-field-D3RXhbCK.js +0 -2
  583. package/bundled-test-harness/assets/color-wheel-picker-Bz8cBmf4.js +0 -283
  584. package/bundled-test-harness/assets/color-wheel-picker-DrwPrB8B.js +0 -2
  585. package/bundled-test-harness/assets/command-data-BxXgtNBf.js +0 -2
  586. package/bundled-test-harness/assets/command-data-ZdkcpEgG.js +0 -95
  587. package/bundled-test-harness/assets/compaction-test-DS7DTGT_.js +0 -150
  588. package/bundled-test-harness/assets/components-CbCTWAON.js +0 -17777
  589. package/bundled-test-harness/assets/computed-test-D_OrXDtR.js +0 -1320
  590. package/bundled-test-harness/assets/container-DDolu1gk.js +0 -11109
  591. package/bundled-test-harness/assets/container-DndcCIMv.css +0 -5169
  592. package/bundled-test-harness/assets/contains-many-component-BtgnAXih.js +0 -2
  593. package/bundled-test-harness/assets/contrast-checker-addon-kwtLKWdL.js +0 -2
  594. package/bundled-test-harness/assets/contrast-checker-addon-zFY5cen1.js +0 -71
  595. package/bundled-test-harness/assets/convert-to-class-name-test-BcGWl2K1.js +0 -17
  596. package/bundled-test-harness/assets/coordinate-D72EF1Pl.js +0 -48
  597. package/bundled-test-harness/assets/copy-file-to-realm-test-CYoDX4YV.js +0 -148
  598. package/bundled-test-harness/assets/country-B-iIe5v8.js +0 -199
  599. package/bundled-test-harness/assets/create-file-modal-PpvMksjR.js +0 -570
  600. package/bundled-test-harness/assets/create-listing-modal-test-CQtEf_UD.js +0 -273
  601. package/bundled-test-harness/assets/create-listing-pr-request-test-CDtKWyfk.js +0 -117
  602. package/bundled-test-harness/assets/create-spec-test-Cbqk8I9T.js +0 -256
  603. package/bundled-test-harness/assets/create-specs-CZg2cpnh.js +0 -215
  604. package/bundled-test-harness/assets/create-submission-workflow-test-CYrxF7bg.js +0 -132
  605. package/bundled-test-harness/assets/credential-fields-test-Di4jCJgU.js +0 -157
  606. package/bundled-test-harness/assets/css-value-CceJyI5o.js +0 -48
  607. package/bundled-test-harness/assets/csv-file-def-DJL2aZI9.js +0 -277
  608. package/bundled-test-harness/assets/currency-Bn5WIqzF.js +0 -134
  609. package/bundled-test-harness/assets/date-XI2CVYA2.js +0 -2
  610. package/bundled-test-harness/assets/date-h83UJcFR.js +0 -183
  611. package/bundled-test-harness/assets/date-time-fields-test-Cterr2mj.js +0 -359
  612. package/bundled-test-harness/assets/datetime-DadI80tC.js +0 -201
  613. package/bundled-test-harness/assets/datetime-Dpb_Sejj.js +0 -2
  614. package/bundled-test-harness/assets/datetime-stamp-C4vv397u.js +0 -81
  615. package/bundled-test-harness/assets/datetime-stamp-DIsJdQux.js +0 -2
  616. package/bundled-test-harness/assets/day-C4pZoGNM.js +0 -113
  617. package/bundled-test-harness/assets/day-D0goBhKb.js +0 -2
  618. package/bundled-test-harness/assets/debug-message-test-CV0sj-fl.js +0 -117
  619. package/bundled-test-harness/assets/dist-CAIttNZm.js +0 -1710
  620. package/bundled-test-harness/assets/dist-CLbqnmnm.js +0 -389
  621. package/bundled-test-harness/assets/dist-qkBOmIQy.js +0 -323
  622. package/bundled-test-harness/assets/docx-file-def-hz2tVQKf.js +0 -60
  623. package/bundled-test-harness/assets/docx-meta-extractor-CeRshlxL.js +0 -60
  624. package/bundled-test-harness/assets/docx-meta-extractor-muK5CKF3.js +0 -2
  625. package/bundled-test-harness/assets/duration-BYx1dLfm.js +0 -2
  626. package/bundled-test-harness/assets/duration-FAmTFeUa.js +0 -184
  627. package/bundled-test-harness/assets/email-D-bFy_C1.js +0 -80
  628. package/bundled-test-harness/assets/email-field-test-CY9K2zur.js +0 -75
  629. package/bundled-test-harness/assets/email-j4DZNH2-.js +0 -2
  630. package/bundled-test-harness/assets/enum-B7_baAn_.js +0 -167
  631. package/bundled-test-harness/assets/enum-BQqNzVQS.js +0 -2
  632. package/bundled-test-harness/assets/enum-field-test-BJ9Epz15.js +0 -953
  633. package/bundled-test-harness/assets/error-display-test-CbDWjJ2F.js +0 -343
  634. package/bundled-test-harness/assets/ethereum-address-BOLEnKsm.js +0 -78
  635. package/bundled-test-harness/assets/ethereum-address-s3Kvb2wG.js +0 -2
  636. package/bundled-test-harness/assets/expiration-warning-BaIP1MOZ.js +0 -2
  637. package/bundled-test-harness/assets/expiration-warning-gjEtxPk0.js +0 -90
  638. package/bundled-test-harness/assets/externals-Bih8ejPS.js +0 -4393
  639. package/bundled-test-harness/assets/fallback-banner-MlImHjSD.js +0 -24
  640. package/bundled-test-harness/assets/fallback-banner-live-delete-test-Bm7IKXPf.js +0 -207
  641. package/bundled-test-harness/assets/fallback-banner-test-C7TGA0Ob.js +0 -53
  642. package/bundled-test-harness/assets/fallback-banner-test-lvuaVRXu.js +0 -225
  643. package/bundled-test-harness/assets/fallback-models-test-Dy7iIKUS.js +0 -161
  644. package/bundled-test-harness/assets/field-component-DBoOxTke.js +0 -2
  645. package/bundled-test-harness/assets/field-configuration-test-DnAnzyC-.js +0 -548
  646. package/bundled-test-harness/assets/field-edit-DdJ8Akso.js +0 -2
  647. package/bundled-test-harness/assets/field-edit-XAop92l8.js +0 -36
  648. package/bundled-test-harness/assets/field-markdown-domain-test-cZCqbcjj.js +0 -616
  649. package/bundled-test-harness/assets/field-markdown-oversize-test-BuATetVz.js +0 -88
  650. package/bundled-test-harness/assets/field-markdown-primitives-test-BsubQfhv.js +0 -365
  651. package/bundled-test-harness/assets/field-markdown-specialized-test-4eNLiYpF.js +0 -534
  652. package/bundled-test-harness/assets/field-test-helpers-9I7cHnaU.js +0 -45
  653. package/bundled-test-harness/assets/file-api-CC86I7Er.js +0 -7
  654. package/bundled-test-harness/assets/file-attachment-test-o9191GMb.js +0 -796
  655. package/bundled-test-harness/assets/file-chooser-panel-test-C8aZuJlk.js +0 -153
  656. package/bundled-test-harness/assets/file-chooser-test-B0Tn8CCR.js +0 -504
  657. package/bundled-test-harness/assets/file-def-edit-BSiF2Lje.js +0 -2
  658. package/bundled-test-harness/assets/file-def-edit-C5TYBp_q.js +0 -26
  659. package/bundled-test-harness/assets/file-def-embedded-BLVTCiVB.js +0 -2
  660. package/bundled-test-harness/assets/file-def-embedded-Bep4iD6s.js +0 -38
  661. package/bundled-test-harness/assets/file-def-fitted-BTs-AS78.js +0 -2
  662. package/bundled-test-harness/assets/file-def-fitted-DcPitdYu.js +0 -38
  663. package/bundled-test-harness/assets/file-def-isolated-Kg1YVhm-.js +0 -38
  664. package/bundled-test-harness/assets/file-def-isolated-tK5JWCam.js +0 -2
  665. package/bundled-test-harness/assets/file-def-serialization-test-D4wnd5XK.js +0 -89
  666. package/bundled-test-harness/assets/file-menu-items-CH4-naSK.js +0 -117
  667. package/bundled-test-harness/assets/file-menu-items-emUxx3ZI.js +0 -2
  668. package/bundled-test-harness/assets/file-preview-stage-B1McIWwu.js +0 -2
  669. package/bundled-test-harness/assets/file-preview-stage-BgZLNMN4.js +0 -72
  670. package/bundled-test-harness/assets/file-shell-embedded-BmfuwWfU.js +0 -2
  671. package/bundled-test-harness/assets/file-shell-embedded-zh8CJanA.js +0 -68
  672. package/bundled-test-harness/assets/file-shell-fitted-DSFUNRGJ.js +0 -2
  673. package/bundled-test-harness/assets/file-shell-fitted-DXKDH0fn.js +0 -98
  674. package/bundled-test-harness/assets/file-shell-isolated-0F1MFv4q.js +0 -2
  675. package/bundled-test-harness/assets/file-shell-isolated-DduZZzmi.js +0 -195
  676. package/bundled-test-harness/assets/file-tree-from-index-BzDvvUHy.js +0 -151
  677. package/bundled-test-harness/assets/file-tree-from-index-test-D0hfI4a1.js +0 -96
  678. package/bundled-test-harness/assets/film-BN_HVXBU.js +0 -13
  679. package/bundled-test-harness/assets/film-CKkbUi0L.js +0 -2
  680. package/bundled-test-harness/assets/film-CMNJITZ-.js +0 -4074
  681. package/bundled-test-harness/assets/fitted-CAvdcKpu.js +0 -34
  682. package/bundled-test-harness/assets/fitted-CbKOwd1u.js +0 -2
  683. package/bundled-test-harness/assets/flac-meta-extractor-e8qajPSl.js +0 -99
  684. package/bundled-test-harness/assets/font-file-def-9atde5W8.js +0 -64
  685. package/bundled-test-harness/assets/font-meta-extractor-IralDC8M.js +0 -303
  686. package/bundled-test-harness/assets/font-meta-extractor-zPBVOfoR.js +0 -2
  687. package/bundled-test-harness/assets/formatted-aibot-message-test-CWOiZUng.js +0 -109
  688. package/bundled-test-harness/assets/from-elsewhere-ChxbtsBa.js +0 -131
  689. package/bundled-test-harness/assets/frontmatter-field-cdig7KR9.js +0 -41
  690. package/bundled-test-harness/assets/garbage-collection-test-Dg-ww_Sb.js +0 -403
  691. package/bundled-test-harness/assets/gauge-B45nLOGe.js +0 -106
  692. package/bundled-test-harness/assets/gauge-BK-768BM.js +0 -2
  693. package/bundled-test-harness/assets/general-test-D7cn7PUr.js +0 -926
  694. package/bundled-test-harness/assets/get-relationship-membership-state-test-Skmj9V6y.js +0 -1308
  695. package/bundled-test-harness/assets/gif-meta-extractor-BychhK9q.js +0 -114
  696. package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-C09YUmk4.js +0 -160
  697. package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-DYskx_Kk.js +0 -74
  698. package/bundled-test-harness/assets/helper-BHX0HLF2.js +0 -478
  699. package/bundled-test-harness/assets/host-submode-test-Clw_QnvF.js +0 -1243
  700. package/bundled-test-harness/assets/html-file-def-C0P9giwU.js +0 -82
  701. package/bundled-test-harness/assets/hydratable-card-DnjrxKsT.js +0 -147
  702. package/bundled-test-harness/assets/hydratable-card-test-BAmWHfv1.js +0 -426
  703. package/bundled-test-harness/assets/icons-DBXBZgLe.js +0 -894
  704. package/bundled-test-harness/assets/image-Cip6ojDd.js +0 -47
  705. package/bundled-test-harness/assets/image-file-def-BdQxjZcN.js +0 -65
  706. package/bundled-test-harness/assets/image-file-def-DP4aqWcS.js +0 -3
  707. package/bundled-test-harness/assets/index-changes-test-D8b_56Ke.js +0 -367
  708. package/bundled-test-harness/assets/index-query-engine-test-CCyaUwMX.js +0 -2593
  709. package/bundled-test-harness/assets/inspector-test-BJTVGdOO.js +0 -1930
  710. package/bundled-test-harness/assets/instance-filter-matcher-test-DjsPrXL7.js +0 -788
  711. package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DSqM0vxh.js +0 -475
  712. package/bundled-test-harness/assets/interact-submode-setup-DF31UMX-.js +0 -566
  713. package/bundled-test-harness/assets/is-component-declaration-test-Did47eG9.js +0 -50
  714. package/bundled-test-harness/assets/iso-bmff-LuWkGL__.js +0 -205
  715. package/bundled-test-harness/assets/iso-bmff-_flO6c20.js +0 -2
  716. package/bundled-test-harness/assets/isolated-and-edit-frocLHin.js +0 -2
  717. package/bundled-test-harness/assets/job-priority-header-test-DHLAXfp7.js +0 -81
  718. package/bundled-test-harness/assets/job-scoped-instance-residency-test-C1Bt5j98.js +0 -103
  719. package/bundled-test-harness/assets/join-the-community-BBUSO2cs.js +0 -86
  720. package/bundled-test-harness/assets/jpg-meta-extractor-CoybO4Hq.js +0 -88
  721. package/bundled-test-harness/assets/json-field-8sdH5RQb.js +0 -2
  722. package/bundled-test-harness/assets/json-field-BDD3iTUh.js +0 -19
  723. package/bundled-test-harness/assets/json-file-def-BKibsfc6.js +0 -298
  724. package/bundled-test-harness/assets/last-modified-date-CR5jru2m.js +0 -43
  725. package/bundled-test-harness/assets/last-modified-date-test-jJ00YdTm.js +0 -28
  726. package/bundled-test-harness/assets/links-to-editor-rDoCYaN-.js +0 -2
  727. package/bundled-test-harness/assets/links-to-many-component-BqZT88Fb.js +0 -2
  728. package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-Cp1Eb_4U.js +0 -398
  729. package/bundled-test-harness/assets/linksto-error-sentinel-test-Bddavnh_.js +0 -238
  730. package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-c5WegXnR.js +0 -354
  731. package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CWskzfGW.js +0 -303
  732. package/bundled-test-harness/assets/linksto-sentinel-reload-test-ByeVNhr8.js +0 -197
  733. package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DP26i6Gb.js +0 -260
  734. package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-fDUXx8tO.js +0 -196
  735. package/bundled-test-harness/assets/llm-model-BcLEkTV7.js +0 -64
  736. package/bundled-test-harness/assets/login-CeuuNVvU.css +0 -139
  737. package/bundled-test-harness/assets/login-DV0WlJv-.js +0 -348
  738. package/bundled-test-harness/assets/login-error-text-test-BMGY_9gW.js +0 -51
  739. package/bundled-test-harness/assets/login-test-CL9YpMH5.js +0 -246
  740. package/bundled-test-harness/assets/m4a-meta-extractor-CHO1JQtb.js +0 -204
  741. package/bundled-test-harness/assets/main-CPLT8JNu.js +0 -5
  742. package/bundled-test-harness/assets/markdown-BvBALLGh.js +0 -7
  743. package/bundled-test-harness/assets/markdown-DFezmrFD.js +0 -2
  744. package/bundled-test-harness/assets/markdown-editor-mode-select-Au64bcIO.js +0 -2
  745. package/bundled-test-harness/assets/markdown-editor-mode-select-rK9PP8rv.js +0 -54
  746. package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-CIxizf5k.js +0 -470
  747. package/bundled-test-harness/assets/markdown-embed-preview-pane-test-C7GoNN7l.js +0 -447
  748. package/bundled-test-harness/assets/markdown-embed-preview-test-CDnj4uhd.js +0 -368
  749. package/bundled-test-harness/assets/markdown-fallback-n7PsLNmO.js +0 -2
  750. package/bundled-test-harness/assets/markdown-fallback-test-DTHT6OwQ.js +0 -316
  751. package/bundled-test-harness/assets/markdown-highlighting-test-DJ-4WSE_.js +0 -244
  752. package/bundled-test-harness/assets/markdown-preview-Ccelx5W-.js +0 -64
  753. package/bundled-test-harness/assets/markdown-preview-JXuMC_ve.js +0 -72
  754. package/bundled-test-harness/assets/markdown-preview-test-ByZqrpPk.js +0 -238
  755. package/bundled-test-harness/assets/markdown-skill-frontmatter-test-DAHGeL4K.js +0 -146
  756. package/bundled-test-harness/assets/menu-items-DzJm9H_H.js +0 -2
  757. package/bundled-test-harness/assets/message-tool-test-lmdrIEdY.js +0 -33
  758. package/bundled-test-harness/assets/metadata-fields-BZZr4Qe5.js +0 -2
  759. package/bundled-test-harness/assets/metadata-fields-BtdjGsKE.js +0 -1415
  760. package/bundled-test-harness/assets/midi-audio-def-uYbYFmFi.js +0 -52
  761. package/bundled-test-harness/assets/midi-meta-extractor-DNI5gc1q.js +0 -284
  762. package/bundled-test-harness/assets/midi-meta-extractor-DbKZ4fMG.js +0 -2
  763. package/bundled-test-harness/assets/migrate-skill-test-DI1xceiL.js +0 -161
  764. package/bundled-test-harness/assets/mini-CNoDyHqG.js +0 -1519
  765. package/bundled-test-harness/assets/mini-DexlIeKK.js +0 -85
  766. package/bundled-test-harness/assets/mini-card-chooser-test-DT5eIf1_.js +0 -272
  767. package/bundled-test-harness/assets/mini-file-chooser-test-DTQnKTZJ.js +0 -201
  768. package/bundled-test-harness/assets/missing-template-DL2mwddM.js +0 -2
  769. package/bundled-test-harness/assets/missing-template-ltqlJ4JC.js +0 -48
  770. package/bundled-test-harness/assets/modal-container-DRnt95-S.js +0 -40
  771. package/bundled-test-harness/assets/modal-zE95eEFp.js +0 -322
  772. package/bundled-test-harness/assets/model-cost-tier-test-CcFz7hcv.js +0 -173
  773. package/bundled-test-harness/assets/module-contents-service-Dk_zWt-V.js +0 -256
  774. package/bundled-test-harness/assets/month-BqReBYWo.js +0 -2
  775. package/bundled-test-harness/assets/month-RhvmIp40.js +0 -123
  776. package/bundled-test-harness/assets/month-day-XFAQA72z.js +0 -2
  777. package/bundled-test-harness/assets/month-day-XzKpk6nz.js +0 -192
  778. package/bundled-test-harness/assets/month-year-BeuNr2Cl.js +0 -2
  779. package/bundled-test-harness/assets/month-year-DhU7hATV.js +0 -93
  780. package/bundled-test-harness/assets/mp3-meta-extractor-Dx2RnJc5.js +0 -476
  781. package/bundled-test-harness/assets/mp4-meta-extractor--k0m8KsT.js +0 -188
  782. package/bundled-test-harness/assets/multiple-stacks-test-bC24IWcJ.js +0 -208
  783. package/bundled-test-harness/assets/nested-query-field-render-test-qxElXx1e.js +0 -249
  784. package/bundled-test-harness/assets/no-stacks-test-Br7IGAgV.js +0 -48
  785. package/bundled-test-harness/assets/number-73SsCMEF.js +0 -3
  786. package/bundled-test-harness/assets/number-CicTBWQd.js +0 -151
  787. package/bundled-test-harness/assets/number-field-test-kV5zXo1J.js +0 -184
  788. package/bundled-test-harness/assets/number-input-CQy4xUeA.js +0 -82
  789. package/bundled-test-harness/assets/office-extract-Bo8sbNkK.js +0 -27
  790. package/bundled-test-harness/assets/office-extract-CfBaoRMD.js +0 -2
  791. package/bundled-test-harness/assets/ogg-meta-extractor-aIf5q_Rq.js +0 -225
  792. package/bundled-test-harness/assets/on-key-C8acaldQ.js +0 -472
  793. package/bundled-test-harness/assets/ooxml-Bu3iZezv.js +0 -172
  794. package/bundled-test-harness/assets/ooxml-jQPBQK25.js +0 -2
  795. package/bundled-test-harness/assets/open-image-in-new-tab-test-CP7q3kMm.js +0 -52
  796. package/bundled-test-harness/assets/operation-lowering-test-9Mdr0hRT.js +0 -2812
  797. package/bundled-test-harness/assets/operations-R9b661Qn.js +0 -3
  798. package/bundled-test-harness/assets/operations-Zv_V3Api.js +0 -766
  799. package/bundled-test-harness/assets/operations-invocation-test-BJPpWb2H.js +0 -523
  800. package/bundled-test-harness/assets/operations-query-test-DufdmPQF.js +0 -459
  801. package/bundled-test-harness/assets/operations-test-CzT051YH.js +0 -2518
  802. package/bundled-test-harness/assets/operator-mode-acceptance-test-ByOIOcD0.js +0 -1188
  803. package/bundled-test-harness/assets/operator-mode-card-chooser-test-CNhR9mvv.js +0 -1036
  804. package/bundled-test-harness/assets/operator-mode-links-test-CuxSVTPR.js +0 -793
  805. package/bundled-test-harness/assets/operator-mode-state-service-CCeHt5SH.js +0 -1275
  806. package/bundled-test-harness/assets/operator-mode-state-service-test-C8TI9WWg.js +0 -206
  807. package/bundled-test-harness/assets/operator-mode-test-DG-mG8Tn.js +0 -683
  808. package/bundled-test-harness/assets/operator-mode-ui-test-DB7xhjS0.js +0 -1027
  809. package/bundled-test-harness/assets/overlay-menu-items-test-C6rcdF_S.js +0 -317
  810. package/bundled-test-harness/assets/overlays-D2zmPxzK.js +0 -270
  811. package/bundled-test-harness/assets/overlays-clip-test-Clpq3JzQ.js +0 -91
  812. package/bundled-test-harness/assets/overlays-detached-element-test-BtsTeJch.js +0 -56
  813. package/bundled-test-harness/assets/pane-f-IYhcWT.js +0 -330
  814. package/bundled-test-harness/assets/panel-B3PCSBbf.js +0 -3540
  815. package/bundled-test-harness/assets/panel-Ban7zCBP.js +0 -474
  816. package/bundled-test-harness/assets/past-sessions-test-uM2m-oKV.js +0 -321
  817. package/bundled-test-harness/assets/patch-fields-test-COPjDhnt.js +0 -1014
  818. package/bundled-test-harness/assets/patch-instance-test-CRb3dfby.js +0 -348
  819. package/bundled-test-harness/assets/pdf-file-def-J_yOUU8_.js +0 -76
  820. package/bundled-test-harness/assets/pdf-meta-extractor-83T5Bdo7.js +0 -156
  821. package/bundled-test-harness/assets/pdf-meta-extractor-INFIklMy.js +0 -2
  822. package/bundled-test-harness/assets/pdf-viewer-B4rRluWA.js +0 -2
  823. package/bundled-test-harness/assets/pdf-viewer-vYem8ozk.js +0 -112
  824. package/bundled-test-harness/assets/percentage-ChagfNRG.js +0 -84
  825. package/bundled-test-harness/assets/permission-checking-realm-test-Dmb2a428.js +0 -306
  826. package/bundled-test-harness/assets/phone-number-BiD2eaSd.js +0 -236
  827. package/bundled-test-harness/assets/phone-number-C-wt4_UK.js +0 -2
  828. package/bundled-test-harness/assets/phone-number-field-test-BHzAmuBP.js +0 -73
  829. package/bundled-test-harness/assets/plate-CqN2nM6P.js +0 -41
  830. package/bundled-test-harness/assets/plate-DaIfpORN.js +0 -2
  831. package/bundled-test-harness/assets/player-CGt5fTd5.js +0 -2
  832. package/bundled-test-harness/assets/player-CN0l44LK.js +0 -82
  833. package/bundled-test-harness/assets/plural-field-components-test-CO2g2opW.js +0 -198
  834. package/bundled-test-harness/assets/png-image-def-B_oou2wS.js +0 -48
  835. package/bundled-test-harness/assets/png-meta-extractor-BfPz1qP_.js +0 -2
  836. package/bundled-test-harness/assets/png-meta-extractor-C8ai8sPw.js +0 -111
  837. package/bundled-test-harness/assets/policy-scoped-search-test-BRRp2a1A.js +0 -339
  838. package/bundled-test-harness/assets/pptx-file-def-C3qYEHDM.js +0 -60
  839. package/bundled-test-harness/assets/pptx-meta-extractor-8IuoBq4I.js +0 -77
  840. package/bundled-test-harness/assets/pptx-meta-extractor-BPhy9RMM.js +0 -2
  841. package/bundled-test-harness/assets/prerender-persistence-block-test-Cteb_Rs_.js +0 -124
  842. package/bundled-test-harness/assets/prerender-serialize-cycle-test-CH7b6Ra9.js +0 -134
  843. package/bundled-test-harness/assets/preview-CmERZpI6.js +0 -74
  844. package/bundled-test-harness/assets/preview-format-BPMlCSbb.js +0 -41
  845. package/bundled-test-harness/assets/preview-format-test-B7sA8fbZ.js +0 -103
  846. package/bundled-test-harness/assets/process-card-CtDzDB-_.js +0 -2
  847. package/bundled-test-harness/assets/process-card-erbWKY5h.js +0 -114
  848. package/bundled-test-harness/assets/process-card-test-DXOt1jDW.js +0 -94
  849. package/bundled-test-harness/assets/profile-settings-modal-11BrR058.js +0 -708
  850. package/bundled-test-harness/assets/progress-circle-Cd79Zqh2.js +0 -2
  851. package/bundled-test-harness/assets/progress-circle-sc-W5aUl.js +0 -95
  852. package/bundled-test-harness/assets/quarter-B61kCpcD.js +0 -168
  853. package/bundled-test-harness/assets/quarter-d5jkTzcz.js +0 -2
  854. package/bundled-test-harness/assets/query-field-membership-status-test-BmpVfohw.js +0 -323
  855. package/bundled-test-harness/assets/query-field-page-optin-test-9_Cce-OJ.js +0 -126
  856. package/bundled-test-harness/assets/query-field-schema-test-CwV7xanX.js +0 -231
  857. package/bundled-test-harness/assets/query-field-stale-prerender-test-RkdnZ-VV.js +0 -152
  858. package/bundled-test-harness/assets/query-fields-test-BLxYkTAM.js +0 -535
  859. package/bundled-test-harness/assets/rail-CFPU0tFe.js +0 -2
  860. package/bundled-test-harness/assets/rail-CQ53Dakr.js +0 -44
  861. package/bundled-test-harness/assets/realm-DdVH9lSZ.js +0 -95
  862. package/bundled-test-harness/assets/realm-DdsFw3b-.js +0 -2
  863. package/bundled-test-harness/assets/realm-config-DIslxoB7.js +0 -844
  864. package/bundled-test-harness/assets/realm-config-policy-standing-test-b4WxNDor.js +0 -290
  865. package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-C-rcvkkD.js +0 -274
  866. package/bundled-test-harness/assets/realm-config-settings-test-DDUkM3zw.js +0 -187
  867. package/bundled-test-harness/assets/realm-dropdown-1j55Dy-1.js +0 -560
  868. package/bundled-test-harness/assets/realm-field-test-D-uEtFKO.js +0 -100
  869. package/bundled-test-harness/assets/realm-indexing-test-U9m0epR-.js +0 -4380
  870. package/bundled-test-harness/assets/realm-policy-test-DhKabhlk.js +0 -1141
  871. package/bundled-test-harness/assets/realm-test-BX6C9SS5.js +0 -2363
  872. package/bundled-test-harness/assets/realm-url-tooltip-BjjcKqBx.js +0 -56
  873. package/bundled-test-harness/assets/realm-url-tooltip-test-DW0ZwEEE.js +0 -78
  874. package/bundled-test-harness/assets/reasoning-test-BWT94KXG.js +0 -234
  875. package/bundled-test-harness/assets/recent-colors-addon-CfgmgilF.js +0 -61
  876. package/bundled-test-harness/assets/recent-colors-addon-D--Ry3Pf.js +0 -2
  877. package/bundled-test-harness/assets/relationship-loading-state-test-C5R6jao_.js +0 -290
  878. package/bundled-test-harness/assets/relative-time-Bq7pqums.js +0 -2
  879. package/bundled-test-harness/assets/relative-time-D0QyW4ig.js +0 -129
  880. package/bundled-test-harness/assets/remix-card-test-Cy0h3Xdf.js +0 -58
  881. package/bundled-test-harness/assets/rendered-markdown-Hw_EF8SO.js +0 -263
  882. package/bundled-test-harness/assets/rendered-markdown-test-CqeF-UZd.js +0 -587
  883. package/bundled-test-harness/assets/resident-instance-reuse-test-BiI6L40n.js +0 -82
  884. package/bundled-test-harness/assets/response-field-BCxG5phG.js +0 -38
  885. package/bundled-test-harness/assets/result-tile-DMzRnTP8.js +0 -140
  886. package/bundled-test-harness/assets/rich-markdown-C4RUl7L0.js +0 -2
  887. package/bundled-test-harness/assets/rich-markdown-DxQSCg-o.js +0 -218
  888. package/bundled-test-harness/assets/rich-markdown-field-test-B7wpedKs.js +0 -1647
  889. package/bundled-test-harness/assets/room-D0M0Zwrs.js +0 -1008
  890. package/bundled-test-harness/assets/room-message-test-BWWd4xC8.js +0 -445
  891. package/bundled-test-harness/assets/room-test-DFH-nOwi.js +0 -95
  892. package/bundled-test-harness/assets/run-realm-code-DyVyEDBl.js +0 -1600
  893. package/bundled-test-harness/assets/run-realm-code-test-BpxF-tOz.js +0 -2468
  894. package/bundled-test-harness/assets/schema-generation-test-DjaJqpYP.js +0 -28
  895. package/bundled-test-harness/assets/score-Cfp34BE7.js +0 -2
  896. package/bundled-test-harness/assets/score-DIWWpeyf.js +0 -100
  897. package/bundled-test-harness/assets/scrolling-test-hA_uBwBg.js +0 -384
  898. package/bundled-test-harness/assets/search-C0-b7dJI.js +0 -605
  899. package/bundled-test-harness/assets/search-adorn-test-C6KP3AwA.js +0 -136
  900. package/bundled-test-harness/assets/search-entries-BfPq5sPS.js +0 -472
  901. package/bundled-test-harness/assets/search-entries-result-test-Bl9u_BOD.js +0 -234
  902. package/bundled-test-harness/assets/search-entries-test-BDC_lS43.js +0 -1486
  903. package/bundled-test-harness/assets/search-result-header-DCAze_cg.js +0 -128
  904. package/bundled-test-harness/assets/search-results-Dd0enVun.js +0 -266
  905. package/bundled-test-harness/assets/search-results-test-T5KEEII4.js +0 -578
  906. package/bundled-test-harness/assets/search-selection-menu-test-CCssnBq1.js +0 -108
  907. package/bundled-test-harness/assets/search-sheet-persistence-test-BzQiO-FK.js +0 -131
  908. package/bundled-test-harness/assets/search-test-fyCWb24m.js +0 -2241
  909. package/bundled-test-harness/assets/searchable-BkgeKQMl.js +0 -2
  910. package/bundled-test-harness/assets/searchable-D_6p6fyb.js +0 -192
  911. package/bundled-test-harness/assets/searchable-option-test-CnCUYGaq.js +0 -322
  912. package/bundled-test-harness/assets/searchable-search-doc-test-B8Q0D98v.js +0 -1271
  913. package/bundled-test-harness/assets/sending-test-D5PGBDys.js +0 -576
  914. package/bundled-test-harness/assets/serialization-rri-form-audit-test-BRJ1cJ31.js +0 -136
  915. package/bundled-test-harness/assets/serialization-test-DM6hK258.js +0 -8758
  916. package/bundled-test-harness/assets/setup-C_GgVgzM.js +0 -772
  917. package/bundled-test-harness/assets/shared-link-target-reuse-test-Be-lSKib.js +0 -207
  918. package/bundled-test-harness/assets/show-card-BFG6KR1m.js +0 -67
  919. package/bundled-test-harness/assets/show-card-test-l0wMrfZq.js +0 -365
  920. package/bundled-test-harness/assets/show-file-B8-FRVHj.js +0 -34
  921. package/bundled-test-harness/assets/signed-capture-D_Q44TQ7.js +0 -204
  922. package/bundled-test-harness/assets/signed-capture-link-test-DOS5xpYv.js +0 -132
  923. package/bundled-test-harness/assets/single-stack-test-BIEtzHVS.js +0 -652
  924. package/bundled-test-harness/assets/skill-BUTGmSsm.js +0 -76
  925. package/bundled-test-harness/assets/skill-Bo7R_2Ud.js +0 -3
  926. package/bundled-test-harness/assets/skill-reference-Cs64py3k.js +0 -112
  927. package/bundled-test-harness/assets/skills-test-CXxSIkYa.js +0 -648
  928. package/bundled-test-harness/assets/slider-picker-C81errGI.js +0 -245
  929. package/bundled-test-harness/assets/slider-picker-mvKsy6cR.js +0 -2
  930. package/bundled-test-harness/assets/spec-B55lJurX.js +0 -602
  931. package/bundled-test-harness/assets/store-DyQ0KiyI.js +0 -2205
  932. package/bundled-test-harness/assets/store-module-rebuild-test-C7532_bS.js +0 -454
  933. package/bundled-test-harness/assets/store-search-test-80NMJuoW.js +0 -175
  934. package/bundled-test-harness/assets/store-test-dHiWXXMs.js +0 -3460
  935. package/bundled-test-harness/assets/string-DHlQEHYm.js +0 -9
  936. package/bundled-test-harness/assets/submode-switcher-DQv-CD6G.js +0 -169
  937. package/bundled-test-harness/assets/svg-meta-extractor-Uw_EJytF.js +0 -42
  938. package/bundled-test-harness/assets/swatches-picker-CaEoibN1.js +0 -33
  939. package/bundled-test-harness/assets/swatches-picker-gPl50JbP.js +0 -2
  940. package/bundled-test-harness/assets/switch-submode-BKDnJd4m.js +0 -79
  941. package/bundled-test-harness/assets/switch-submode-test-_E2mVk4z.js +0 -168
  942. package/bundled-test-harness/assets/tag-B60lDr-j.js +0 -105
  943. package/bundled-test-harness/assets/tests-BBBgPBB6.js +0 -3520
  944. package/bundled-test-harness/assets/text-area-CJjWmwpi.js +0 -9
  945. package/bundled-test-harness/assets/text-file-def-u_dl0i2z.js +0 -151
  946. package/bundled-test-harness/assets/text-input-validator-test-BTwnkSS2.js +0 -156
  947. package/bundled-test-harness/assets/theme-BK-fAHVn.js +0 -9
  948. package/bundled-test-harness/assets/theme-card-test-BQmT7rqr.js +0 -621
  949. package/bundled-test-harness/assets/theme-scheme-island-test-Oi3aeyp1.js +0 -264
  950. package/bundled-test-harness/assets/three-d-model-def-B4KckPVC.js +0 -70
  951. package/bundled-test-harness/assets/time-BcuaSkHg.js +0 -126
  952. package/bundled-test-harness/assets/time-f7Irg7Z7.js +0 -2
  953. package/bundled-test-harness/assets/time-slots-ClYIZN53.js +0 -2
  954. package/bundled-test-harness/assets/time-slots-TI1aaqRN.js +0 -85
  955. package/bundled-test-harness/assets/timeline-Cof9eyq0.js +0 -59
  956. package/bundled-test-harness/assets/timeline-DFWQtCWE.js +0 -2
  957. package/bundled-test-harness/assets/to-device-streaming-test-BDrUUlOt.js +0 -163
  958. package/bundled-test-harness/assets/token-usage-test-CiZo03fY.js +0 -166
  959. package/bundled-test-harness/assets/tool-field-BXHr9r0w.js +0 -94
  960. package/bundled-test-harness/assets/tool-field-CoRO5C4R.js +0 -2
  961. package/bundled-test-harness/assets/tools-CmVaYDIS.js +0 -725
  962. package/bundled-test-harness/assets/tools-calling-test-B454__XF.js +0 -200
  963. package/bundled-test-harness/assets/tools-test-CLu51dJO.js +0 -1624
  964. package/bundled-test-harness/assets/tools-test-XGRAvVug.js +0 -2820
  965. package/bundled-test-harness/assets/ts-file-def-C05BDwdg.js +0 -159
  966. package/bundled-test-harness/assets/update-room-skills-test-jOvP14JX.js +0 -240
  967. package/bundled-test-harness/assets/url-BFf2CNo-.js +0 -2
  968. package/bundled-test-harness/assets/url-CYm-CeXp.js +0 -96
  969. package/bundled-test-harness/assets/video-file-def-B2UIrOFS.js +0 -76
  970. package/bundled-test-harness/assets/wav-meta-extractor-BNkv7e2f.js +0 -368
  971. package/bundled-test-harness/assets/webm-meta-extractor-C933kYyc.js +0 -178
  972. package/bundled-test-harness/assets/webp-meta-extractor-BLz0z1pZ.js +0 -98
  973. package/bundled-test-harness/assets/website-BuOMUW1v.js +0 -92
  974. package/bundled-test-harness/assets/week-Bo0666ji.js +0 -111
  975. package/bundled-test-harness/assets/week-CaVFA8Vc.js +0 -2
  976. package/bundled-test-harness/assets/welcome-to-boxel-PWard7GF.js +0 -172
  977. package/bundled-test-harness/assets/workspace-KXfFTQNV.js +0 -614
  978. package/bundled-test-harness/assets/workspace-a11y-test-Buwb-rfO.js +0 -197
  979. package/bundled-test-harness/assets/workspace-behavior-test-CbgFUOOo.js +0 -200
  980. package/bundled-test-harness/assets/workspace-chooser-BmQvhhrl.js +0 -2248
  981. package/bundled-test-harness/assets/workspace-chooser-Cu84Gd_E.css +0 -1317
  982. package/bundled-test-harness/assets/workspace-chooser-catalog-order-test-rcRw6sni.js +0 -36
  983. package/bundled-test-harness/assets/workspace-chooser-unreachable-notice-test-DUXnBIdY.js +0 -60
  984. package/bundled-test-harness/assets/workspace-delete-multiple-test-DjRKhZ2g.js +0 -212
  985. package/bundled-test-harness/assets/workspace-delete-summary-test-CvkLVYyN.js +0 -63
  986. package/bundled-test-harness/assets/workspace-timestamp-labels-test-AYJT4inv.js +0 -58
  987. package/bundled-test-harness/assets/xlsx-file-def-DuKdbGrJ.js +0 -60
  988. package/bundled-test-harness/assets/xlsx-meta-extractor-Bz-C2JWP.js +0 -101
  989. package/bundled-test-harness/assets/xlsx-meta-extractor-ClwwgABg.js +0 -2
  990. package/bundled-test-harness/assets/year-B6ctHikl.js +0 -2
  991. package/bundled-test-harness/assets/year-C11uAQE6.js +0 -78
  992. package/bundled-test-harness/assets/zip-file-def-B8XN-OS_.js +0 -288
  993. package/bundled-types/host-app/components/matrix/auth-button.gts +0 -39
  994. package/bundled-types/host-app/components/matrix/auth-container.gts +0 -69
  995. package/bundled-types/host-app/components/matrix/auth-form-field.gts +0 -43
@@ -1,2812 +0,0 @@
1
- import { s as __toESM } from "./chunk-Rp0pCe6z.js";
2
- import { r as initializeDeferredDecorator, t as decorateFieldV2 } from "./runtime--fcdnjmJ-BoCBNIsz.js";
3
- import { Ar as testRealmURL, Ia as fetcher, Ms as Loader, Sa as maybeHandleScopedCSSRequest, Ui as DEFINITION_FREE_BASE_OPERATIONS, Wo as loadCardDef, ja as VirtualNetwork, jo as identifyCard, ls as getFieldDefinitions, ss as definitionKind } from "./runtime-common-ClpqhbwG.js";
4
- import { D as baseRealm } from "./constants-CqKWhRfY.js";
5
- import { t as config } from "./environment-DIUJgBKt.js";
6
- import { t as shimExternals } from "./externals-Bih8ejPS.js";
7
- import { t as lowerOperationDeclarations } from "./card-operations-EgX45pFB.js";
8
- import { t as require_qunit } from "./qunit-C-Foo4Nd.js";
9
- import "./mock-matrix-DPQ0j2MD.js";
10
- //#region tests/unit/operation-lowering-test.ts
11
- var import_qunit = /* @__PURE__ */ __toESM(require_qunit());
12
- var { resolvedBaseRealmURL } = config;
13
- (0, import_qunit.module)("Unit | operation lowering", function(hooks) {
14
- let loader;
15
- let api;
16
- let operations;
17
- let virtualNetwork;
18
- let StringField;
19
- let NumberField;
20
- let fixtures;
21
- hooks.beforeEach(async function() {
22
- virtualNetwork = new VirtualNetwork();
23
- virtualNetwork.addURLMapping(new URL(baseRealm.url), new URL(resolvedBaseRealmURL));
24
- virtualNetwork.addRealmMapping("@cardstack/base/", resolvedBaseRealmURL);
25
- virtualNetwork.addImportMap("@cardstack/boxel-icons/", (rest) => {
26
- return `${config.iconsURL}/@cardstack/boxel-icons/v1/icons/${rest}.js`;
27
- });
28
- shimExternals(virtualNetwork);
29
- loader = new Loader(fetcher(virtualNetwork.fetch, [async (req, next) => {
30
- return await maybeHandleScopedCSSRequest(req) || next(req);
31
- }]), virtualNetwork.resolveImport, { virtualNetwork });
32
- api = await loader.import("@cardstack/base/card-api");
33
- operations = await loader.import("@cardstack/base/operations");
34
- ({default: StringField} = await loader.import("@cardstack/base/string"));
35
- ({default: NumberField} = await loader.import("@cardstack/base/number"));
36
- let { field, contains, linksTo, linksToMany, CardDef, FieldDef } = api;
37
- class Author extends CardDef {
38
- static displayName = "Author";
39
- static {
40
- decorateFieldV2(this.prototype, "name", [field], function() {
41
- return contains(StringField);
42
- });
43
- }
44
- #name = (initializeDeferredDecorator(this, "name"), void 0);
45
- }
46
- class Address extends FieldDef {
47
- static displayName = "Address";
48
- static {
49
- decorateFieldV2(this.prototype, "city", [field], function() {
50
- return contains(StringField);
51
- });
52
- }
53
- #city = (initializeDeferredDecorator(this, "city"), void 0);
54
- }
55
- class Comment extends FieldDef {
56
- static displayName = "Comment";
57
- static {
58
- decorateFieldV2(this.prototype, "body", [field], function() {
59
- return contains(StringField);
60
- });
61
- }
62
- #body = (initializeDeferredDecorator(this, "body"), void 0);
63
- static {
64
- decorateFieldV2(this.prototype, "postedBy", [field], function() {
65
- return contains(StringField);
66
- });
67
- }
68
- #postedBy = (initializeDeferredDecorator(this, "postedBy"), void 0);
69
- static {
70
- decorateFieldV2(this.prototype, "author", [field], function() {
71
- return linksTo(() => Author);
72
- });
73
- }
74
- #author = (initializeDeferredDecorator(this, "author"), void 0);
75
- static {
76
- decorateFieldV2(this.prototype, "where", [field], function() {
77
- return contains(Address);
78
- });
79
- }
80
- #where = (initializeDeferredDecorator(this, "where"), void 0);
81
- }
82
- class Activity extends CardDef {
83
- static displayName = "Activity";
84
- static {
85
- decorateFieldV2(this.prototype, "label", [field], function() {
86
- return contains(StringField);
87
- });
88
- }
89
- #label = (initializeDeferredDecorator(this, "label"), void 0);
90
- static {
91
- decorateFieldV2(this.prototype, "postedBy", [field], function() {
92
- return contains(StringField);
93
- });
94
- }
95
- #postedBy = (initializeDeferredDecorator(this, "postedBy"), void 0);
96
- static {
97
- decorateFieldV2(this.prototype, "owner", [field], function() {
98
- return linksTo(() => Author);
99
- });
100
- }
101
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
102
- static {
103
- decorateFieldV2(this.prototype, "witnesses", [field], function() {
104
- return linksToMany(() => Author);
105
- });
106
- }
107
- #witnesses = (initializeDeferredDecorator(this, "witnesses"), void 0);
108
- }
109
- shim({
110
- Author,
111
- Address,
112
- Comment,
113
- Activity
114
- });
115
- fixtures = {
116
- Author,
117
- Comment,
118
- Activity
119
- };
120
- });
121
- function shim(exports) {
122
- for (let [name, def] of Object.entries(exports)) loader.shimModule(`${testRealmURL}${name.toLowerCase()}`, { [name]: def });
123
- }
124
- function buildDefinition(def) {
125
- let { fields, fieldDefs } = getFieldDefinitions(api, def);
126
- return {
127
- codeRef: identifyCard(def),
128
- displayName: def.displayName ?? null,
129
- fields,
130
- fieldDefs,
131
- type: definitionKind(def)
132
- };
133
- }
134
- async function lookupDefinition(codeRef) {
135
- try {
136
- return buildDefinition(await loadCardDef(codeRef, { loader }));
137
- } catch {
138
- return;
139
- }
140
- }
141
- async function lower(def) {
142
- return await lowerOperationDeclarations(operations.getDeclaredOperations(def), {
143
- definition: buildDefinition(def),
144
- lookupDefinition,
145
- identifyCard: (target) => identifyCard(target)
146
- });
147
- }
148
- function codes(result) {
149
- return result.issues.map((issue) => issue.code);
150
- }
151
- (0, import_qunit.test)("append lowers to an append statement, with a link-typed member as a card identity", async function(assert) {
152
- let { field, contains, containsMany, CardDef } = api;
153
- let { operation, params, actor, linkTo } = operations;
154
- class Report extends CardDef {
155
- static displayName = "Report";
156
- static {
157
- decorateFieldV2(this.prototype, "title", [field], function() {
158
- return contains(StringField);
159
- });
160
- }
161
- #title = (initializeDeferredDecorator(this, "title"), void 0);
162
- static {
163
- decorateFieldV2(this.prototype, "comments", [field], function() {
164
- return containsMany(fixtures.Comment);
165
- });
166
- }
167
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
168
- static {
169
- decorateFieldV2(this, "addComment", [operation], function() {
170
- return {
171
- base: "transform",
172
- params: {
173
- body: StringField,
174
- author: linkTo(() => fixtures.Author)
175
- },
176
- append: {
177
- to: "comments",
178
- value: {
179
- body: params("body"),
180
- postedBy: actor(),
181
- author: params("author")
182
- }
183
- }
184
- };
185
- });
186
- }
187
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
188
- }
189
- shim({ Report });
190
- let { operations: lowered, issues } = await lower(Report);
191
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
192
- assert.deepEqual(lowered.addComment, {
193
- base: "transform",
194
- params: {
195
- body: {
196
- kind: "field",
197
- codeRef: identifyCard(StringField)
198
- },
199
- author: {
200
- kind: "link",
201
- codeRef: identifyCard(fixtures.Author)
202
- }
203
- },
204
- program: {
205
- source: "append(.comments;{body:params(\"body\"),postedBy:actor(),author:card(params(\"author\"))});",
206
- syntax: "solidified"
207
- },
208
- deterministic: true,
209
- readsActor: true
210
- }, "a link-typed member becomes a card identity while a scalar one stays the bare builtin, and a program naming the actor says so");
211
- });
212
- (0, import_qunit.test)("an actor in a link position is an authoring issue, not a spelling the lowering repairs", async function(assert) {
213
- let { field, contains, containsMany, linksTo, CardDef } = api;
214
- let { operation, actor } = operations;
215
- class Report extends CardDef {
216
- static displayName = "Report";
217
- static {
218
- decorateFieldV2(this.prototype, "title", [field], function() {
219
- return contains(StringField);
220
- });
221
- }
222
- #title = (initializeDeferredDecorator(this, "title"), void 0);
223
- static {
224
- decorateFieldV2(this.prototype, "owner", [field], function() {
225
- return linksTo(() => fixtures.Author);
226
- });
227
- }
228
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
229
- static {
230
- decorateFieldV2(this.prototype, "comments", [field], function() {
231
- return containsMany(fixtures.Comment);
232
- });
233
- }
234
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
235
- static {
236
- decorateFieldV2(this, "claim", [operation], function() {
237
- return {
238
- base: "transform",
239
- set: { owner: actor() }
240
- };
241
- });
242
- }
243
- #claim = (initializeDeferredDecorator(this, "claim"), void 0);
244
- static {
245
- decorateFieldV2(this, "addComment", [operation], function() {
246
- return {
247
- base: "transform",
248
- append: {
249
- to: "comments",
250
- value: { author: actor() }
251
- }
252
- };
253
- });
254
- }
255
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
256
- }
257
- shim({ Report });
258
- let result = await lower(Report);
259
- assert.deepEqual(codes(result), ["actor-not-a-card", "actor-not-a-card"]);
260
- assert.deepEqual(result.issues.map((issue) => issue.path), ["set.owner", "append.value.author"], "both the field itself and a member of a contained value are reached");
261
- assert.true(result.issues[0].message.includes("linkTo(…)"), "the message names the declaration that does express a link to a person");
262
- assert.true(result.operations.claim.invalid, "an operation carrying the issue reports it rather than running");
263
- });
264
- (0, import_qunit.test)("a create fills a link field with a card identity, and the caller is not one", async function(assert) {
265
- let { field, contains, CardDef } = api;
266
- let { operation, actor } = operations;
267
- class Classroom extends CardDef {
268
- static displayName = "Classroom";
269
- static {
270
- decorateFieldV2(this.prototype, "name", [field], function() {
271
- return contains(StringField);
272
- });
273
- }
274
- #name = (initializeDeferredDecorator(this, "name"), void 0);
275
- static {
276
- decorateFieldV2(this, "addActivity", [operation], function() {
277
- return {
278
- base: "create",
279
- of: () => fixtures.Activity,
280
- fill: { owner: actor() }
281
- };
282
- });
283
- }
284
- #addActivity = (initializeDeferredDecorator(this, "addActivity"), void 0);
285
- static {
286
- decorateFieldV2(this, "addWitnessed", [operation], function() {
287
- return {
288
- base: "create",
289
- of: () => fixtures.Activity,
290
- fill: { witnesses: [actor()] }
291
- };
292
- });
293
- }
294
- #addWitnessed = (initializeDeferredDecorator(this, "addWitnessed"), void 0);
295
- }
296
- shim({ Classroom });
297
- let result = await lower(Classroom);
298
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "fill.owner"], ["actor-not-a-card", "fill.witnesses[0]"]], "a link collection is filled with a list, so every entry is an identity too");
299
- });
300
- (0, import_qunit.test)("set lowers to one assignment per field, and a scalar reference stays a bare builtin", async function(assert) {
301
- let { field, contains, CardDef } = api;
302
- let { operation, params, actor } = operations;
303
- class Report extends CardDef {
304
- static displayName = "Report";
305
- static {
306
- decorateFieldV2(this.prototype, "status", [field], function() {
307
- return contains(StringField);
308
- });
309
- }
310
- #status = (initializeDeferredDecorator(this, "status"), void 0);
311
- static {
312
- decorateFieldV2(this.prototype, "closedBy", [field], function() {
313
- return contains(StringField);
314
- });
315
- }
316
- #closedBy = (initializeDeferredDecorator(this, "closedBy"), void 0);
317
- static {
318
- decorateFieldV2(this, "close", [operation], function() {
319
- return {
320
- base: "transform",
321
- params: { note: StringField },
322
- set: {
323
- status: "closed",
324
- closedBy: actor(),
325
- "cardInfo.notes": params("note")
326
- }
327
- };
328
- });
329
- }
330
- #close = (initializeDeferredDecorator(this, "close"), void 0);
331
- }
332
- shim({ Report });
333
- let { operations: lowered, issues } = await lower(Report);
334
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
335
- assert.strictEqual(lowered.close.program?.source, [
336
- ".status=\"closed\";",
337
- ".closedBy=actor();",
338
- ".cardInfo.notes=params(\"note\");"
339
- ].join("\n"), "a scalar field reads the builtin directly");
340
- });
341
- (0, import_qunit.test)("assert lowers to a uniqueness precondition keyed by the collection kind", async function(assert) {
342
- let { field, contains, containsMany, linksToMany, CardDef } = api;
343
- let { operation, params, actor } = operations;
344
- class Report extends CardDef {
345
- static displayName = "Report";
346
- static {
347
- decorateFieldV2(this.prototype, "tags", [field], function() {
348
- return containsMany(StringField);
349
- });
350
- }
351
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
352
- static {
353
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
354
- return linksToMany(() => fixtures.Author, { searchable: true });
355
- });
356
- }
357
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
358
- static {
359
- decorateFieldV2(this.prototype, "title", [field], function() {
360
- return contains(StringField);
361
- });
362
- }
363
- #title = (initializeDeferredDecorator(this, "title"), void 0);
364
- static {
365
- decorateFieldV2(this, "addTag", [operation], function() {
366
- return {
367
- base: "transform",
368
- params: { tag: StringField },
369
- assert: {
370
- unique: "tags",
371
- by: params("tag"),
372
- message: "already tagged"
373
- },
374
- append: {
375
- to: "tags",
376
- value: params("tag")
377
- }
378
- };
379
- });
380
- }
381
- #addTag = (initializeDeferredDecorator(this, "addTag"), void 0);
382
- static {
383
- decorateFieldV2(this, "addReviewer", [operation], function() {
384
- return {
385
- base: "transform",
386
- params: { who: StringField },
387
- assert: {
388
- unique: "reviewers",
389
- by: params("who"),
390
- snapshot: true
391
- }
392
- };
393
- });
394
- }
395
- #addReviewer = (initializeDeferredDecorator(this, "addReviewer"), void 0);
396
- static {
397
- decorateFieldV2(this, "claimReview", [operation], function() {
398
- return {
399
- base: "transform",
400
- assert: {
401
- unique: "reviewers",
402
- by: actor(),
403
- snapshot: true
404
- }
405
- };
406
- });
407
- }
408
- #claimReview = (initializeDeferredDecorator(this, "claimReview"), void 0);
409
- static {
410
- decorateFieldV2(this, "tagSelf", [operation], function() {
411
- return {
412
- base: "transform",
413
- assert: {
414
- unique: "tags",
415
- by: actor()
416
- },
417
- append: {
418
- to: "tags",
419
- value: actor()
420
- }
421
- };
422
- });
423
- }
424
- #tagSelf = (initializeDeferredDecorator(this, "tagSelf"), void 0);
425
- }
426
- shim({ Report });
427
- let { operations: lowered, issues } = await lower(Report);
428
- assert.deepEqual(issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "assert.by"]], "only the comparison against a link collection is refused");
429
- assert.strictEqual(lowered.addTag.program?.source, ["assert(all(.tags[];.!=params(\"tag\"));\"already tagged\");", "append(.tags;params(\"tag\"));"].join("\n"), "a contained collection compares the item itself, and the precondition runs before the write");
430
- assert.strictEqual(lowered.addReviewer.program?.source, "assert(all(.reviewers[];.id!=params(\"who\"));\"reviewers already holds this value\");", "a link collection compares the linked card id against the identity itself — not against a card() projection — and an omitted message gets a default");
431
- assert.strictEqual(lowered.tagSelf.program?.source, ["assert(all(.tags[];.!=actor());\"tags already holds this value\");", "append(.tags;actor());"].join("\n"), "a contained collection compares the caller id against the item itself");
432
- assert.true(lowered.claimReview.invalid, "while a link collection compares against a linked card id, which the caller is not");
433
- assert.true(lowered.addReviewer.snapshot, "the gathering the author opted into travels with the program that needs it");
434
- assert.strictEqual(lowered.addTag.snapshot, void 0, "while an assert the stored document can answer asks for none");
435
- });
436
- (0, import_qunit.test)("a create lowers `of` to a code ref and keeps `fill` a marker-carrying template", async function(assert) {
437
- let { field, contains, CardDef } = api;
438
- let { operation, params, actor, linkTo } = operations;
439
- class Classroom extends CardDef {
440
- static displayName = "Classroom";
441
- static {
442
- decorateFieldV2(this.prototype, "name", [field], function() {
443
- return contains(StringField);
444
- });
445
- }
446
- #name = (initializeDeferredDecorator(this, "name"), void 0);
447
- static {
448
- decorateFieldV2(this, "addActivity", [operation], function() {
449
- return {
450
- base: "create",
451
- params: {
452
- label: StringField,
453
- teacher: linkTo(() => fixtures.Author)
454
- },
455
- of: () => fixtures.Activity,
456
- fill: {
457
- label: params("label"),
458
- postedBy: actor()
459
- }
460
- };
461
- });
462
- }
463
- #addActivity = (initializeDeferredDecorator(this, "addActivity"), void 0);
464
- }
465
- shim({ Classroom });
466
- let { operations: lowered, issues } = await lower(Classroom);
467
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
468
- assert.deepEqual(lowered.addActivity, {
469
- base: "create",
470
- params: {
471
- label: {
472
- kind: "field",
473
- codeRef: identifyCard(StringField)
474
- },
475
- teacher: {
476
- kind: "link",
477
- codeRef: identifyCard(fixtures.Author)
478
- }
479
- },
480
- of: identifyCard(fixtures.Activity),
481
- fill: {
482
- label: {
483
- $ref: "params",
484
- key: "label"
485
- },
486
- postedBy: { $ref: "actor" }
487
- },
488
- deterministic: true,
489
- readsActor: true
490
- }, "a linkTo param is a link entry, fill stays data for the coordinator to substitute, and an actor marker inside it is reported the same as one in a program");
491
- });
492
- (0, import_qunit.test)("a query lowers to an entry-wire query template with code refs in the type slots", async function(assert) {
493
- let { field, contains, CardDef } = api;
494
- let { operation, actor, params } = operations;
495
- class Report extends CardDef {
496
- static displayName = "Report";
497
- static {
498
- decorateFieldV2(this.prototype, "title", [field], function() {
499
- return contains(StringField);
500
- });
501
- }
502
- #title = (initializeDeferredDecorator(this, "title"), void 0);
503
- static {
504
- decorateFieldV2(this, "mine", [operation], function() {
505
- return {
506
- base: "query",
507
- params: { term: StringField },
508
- query: {
509
- filter: {
510
- on: () => fixtures.Author,
511
- eq: { name: actor() }
512
- },
513
- sort: [{
514
- by: "name",
515
- on: () => fixtures.Author,
516
- direction: "desc"
517
- }],
518
- page: {
519
- size: 20,
520
- number: 0
521
- },
522
- queryString: params("term"),
523
- realms: [testRealmURL]
524
- }
525
- };
526
- });
527
- }
528
- #mine = (initializeDeferredDecorator(this, "mine"), void 0);
529
- }
530
- shim({ Report });
531
- let { operations: lowered, issues } = await lower(Report);
532
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
533
- assert.deepEqual(lowered.mine.query, {
534
- filter: { every: [{
535
- "item.on": identifyCard(fixtures.Author),
536
- eq: { "item.name": { $ref: "actor" } }
537
- }, { matches: {
538
- $ref: "params",
539
- key: "term"
540
- } }] },
541
- sort: [{
542
- by: "item.name",
543
- "item.on": identifyCard(fixtures.Author),
544
- direction: "desc"
545
- }],
546
- page: {
547
- size: 20,
548
- number: 0
549
- },
550
- realms: [testRealmURL]
551
- }, "the type anchors resolve to code refs, field paths gain item. addressing, and the declared term becomes a matches conjunct");
552
- });
553
- (0, import_qunit.test)("a raw program is canonicalized rather than stored as written", async function(assert) {
554
- let { field, contains, CardDef } = api;
555
- let { operation, bxl } = operations;
556
- class Report extends CardDef {
557
- static displayName = "Report";
558
- static {
559
- decorateFieldV2(this.prototype, "status", [field], function() {
560
- return contains(StringField);
561
- });
562
- }
563
- #status = (initializeDeferredDecorator(this, "status"), void 0);
564
- static {
565
- decorateFieldV2(this.prototype, "revision", [field], function() {
566
- return contains(NumberField);
567
- });
568
- }
569
- #revision = (initializeDeferredDecorator(this, "revision"), void 0);
570
- static {
571
- decorateFieldV2(this, "escalate", [operation], function() {
572
- return {
573
- base: "transform",
574
- transformations: bxl`.status = "escalated"; .revision = IF(.revision = null; 1; .revision + 1);`
575
- };
576
- });
577
- }
578
- #escalate = (initializeDeferredDecorator(this, "escalate"), void 0);
579
- }
580
- shim({ Report });
581
- let { operations: lowered, issues } = await lower(Report);
582
- assert.deepEqual(issues, [], "the program parses");
583
- assert.deepEqual(lowered.escalate.program, {
584
- source: ".status=\"escalated\";\n.revision=IF(.revision==null;1;.revision+1);",
585
- syntax: "solidified"
586
- }, "the author's Excel-style comparison is stored in canonical form");
587
- });
588
- (0, import_qunit.test)("an output projection lowers to the program it describes", async function(assert) {
589
- let { field, contains, CardDef } = api;
590
- let { operation, actor } = operations;
591
- class Report extends CardDef {
592
- static displayName = "Report";
593
- static {
594
- decorateFieldV2(this.prototype, "title", [field], function() {
595
- return contains(StringField);
596
- });
597
- }
598
- #title = (initializeDeferredDecorator(this, "title"), void 0);
599
- static {
600
- decorateFieldV2(this, "read", [operation], function() {
601
- return {
602
- base: "read",
603
- output: { label: actor() }
604
- };
605
- });
606
- }
607
- #read = (initializeDeferredDecorator(this, "read"), void 0);
608
- }
609
- shim({ Report });
610
- let { operations: lowered, issues } = await lower(Report);
611
- assert.deepEqual(issues, [], "the projection lowers cleanly");
612
- assert.deepEqual(lowered.read, {
613
- base: "read",
614
- output: {
615
- source: "{label:actor()}",
616
- syntax: "solidified"
617
- },
618
- deterministic: true,
619
- readsActor: true
620
- }, "a declarative projection and a raw program reach the realm in one form, and a projection reading the actor is reported like any other stage");
621
- });
622
- (0, import_qunit.test)("an author-supplied optimistic flag is carried through", async function(assert) {
623
- let { field, contains, CardDef } = api;
624
- let { operation } = operations;
625
- class Report extends CardDef {
626
- static displayName = "Report";
627
- static {
628
- decorateFieldV2(this.prototype, "status", [field], function() {
629
- return contains(StringField);
630
- });
631
- }
632
- #status = (initializeDeferredDecorator(this, "status"), void 0);
633
- static {
634
- decorateFieldV2(this, "close", [operation], function() {
635
- return {
636
- base: "transform",
637
- optimistic: false,
638
- set: { status: "closed" }
639
- };
640
- });
641
- }
642
- #close = (initializeDeferredDecorator(this, "close"), void 0);
643
- }
644
- shim({ Report });
645
- let { operations: lowered } = await lower(Report);
646
- assert.false(lowered.close.optimistic, "the author's override reaches the client unchanged");
647
- });
648
- (0, import_qunit.test)("a non-grantable declaration is carried through, and nothing else is marked", async function(assert) {
649
- let { field, contains, containsMany, CardDef } = api;
650
- let { operation } = operations;
651
- class Ledger extends CardDef {
652
- static displayName = "Ledger";
653
- static {
654
- decorateFieldV2(this.prototype, "status", [field], function() {
655
- return contains(StringField);
656
- });
657
- }
658
- #status = (initializeDeferredDecorator(this, "status"), void 0);
659
- static {
660
- decorateFieldV2(this.prototype, "entries", [field], function() {
661
- return containsMany(StringField);
662
- });
663
- }
664
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
665
- static {
666
- decorateFieldV2(this, "seal", [operation], function() {
667
- return {
668
- base: "transform",
669
- nonGrantable: true,
670
- set: { status: "sealed" }
671
- };
672
- });
673
- }
674
- #seal = (initializeDeferredDecorator(this, "seal"), void 0);
675
- static {
676
- decorateFieldV2(this, "reopen", [operation], function() {
677
- return {
678
- base: "transform",
679
- set: { status: "open" }
680
- };
681
- });
682
- }
683
- #reopen = (initializeDeferredDecorator(this, "reopen"), void 0);
684
- static {
685
- decorateFieldV2(this, "appendContainsMany", [operation], function() {
686
- return {
687
- base: "appendContainsMany",
688
- nonGrantable: true
689
- };
690
- });
691
- }
692
- #appendContainsMany = (initializeDeferredDecorator(this, "appendContainsMany"), void 0);
693
- static {
694
- decorateFieldV2(this, "broken", [operation], function() {
695
- return {
696
- base: "transform",
697
- nonGrantable: true,
698
- set: { missing: "x" }
699
- };
700
- });
701
- }
702
- #broken = (initializeDeferredDecorator(this, "broken"), void 0);
703
- }
704
- shim({ Ledger });
705
- let { operations: lowered, issues } = await lower(Ledger);
706
- assert.deepEqual(issues.map((issue) => `${issue.operation}: ${issue.code}`), ["broken: unknown-field"], "only the declaration naming a missing field has findings");
707
- assert.true(lowered.seal.nonGrantable, "the flag reaches the realm");
708
- assert.false("nonGrantable" in lowered.reopen, "a declaration that does not ask carries no flag");
709
- assert.deepEqual(lowered.appendContainsMany, {
710
- base: "appendContainsMany",
711
- deterministic: true,
712
- nonGrantable: true
713
- }, "the built-in append, marked, lowers to no items, which the executor reads as the built-in");
714
- assert.true(lowered.broken.invalid, "the broken declaration is invalid");
715
- assert.true(lowered.broken.nonGrantable, "and a finding against it does not make it grantable");
716
- });
717
- (0, import_qunit.test)("a label is lowered onto the entry as written, on every base", async function(assert) {
718
- let { field, contains, containsMany, CardDef } = api;
719
- let { operation } = operations;
720
- class Inbox extends CardDef {
721
- static displayName = "Inbox";
722
- static {
723
- decorateFieldV2(this.prototype, "status", [field], function() {
724
- return contains(StringField);
725
- });
726
- }
727
- #status = (initializeDeferredDecorator(this, "status"), void 0);
728
- static {
729
- decorateFieldV2(this.prototype, "notes", [field], function() {
730
- return containsMany(StringField);
731
- });
732
- }
733
- #notes = (initializeDeferredDecorator(this, "notes"), void 0);
734
- static {
735
- decorateFieldV2(this, "archive", [operation], function() {
736
- return {
737
- base: "transform",
738
- label: "Archive this inbox",
739
- set: { status: "archived" }
740
- };
741
- });
742
- }
743
- #archive = (initializeDeferredDecorator(this, "archive"), void 0);
744
- static {
745
- decorateFieldV2(this, "read", [operation], function() {
746
- return {
747
- base: "read",
748
- label: "Read your inbox"
749
- };
750
- });
751
- }
752
- #read = (initializeDeferredDecorator(this, "read"), void 0);
753
- static {
754
- decorateFieldV2(this, "appendContainsMany", [operation], function() {
755
- return {
756
- base: "appendContainsMany",
757
- label: "Add a note"
758
- };
759
- });
760
- }
761
- #appendContainsMany = (initializeDeferredDecorator(this, "appendContainsMany"), void 0);
762
- static {
763
- decorateFieldV2(this, "reopen", [operation], function() {
764
- return {
765
- base: "transform",
766
- set: { status: "open" }
767
- };
768
- });
769
- }
770
- #reopen = (initializeDeferredDecorator(this, "reopen"), void 0);
771
- }
772
- shim({ Inbox });
773
- let { operations: lowered, issues } = await lower(Inbox);
774
- assert.deepEqual(issues, [], "a valid label is no finding");
775
- assert.strictEqual(lowered.archive.label, "Archive this inbox");
776
- assert.strictEqual(lowered.read.label, "Read your inbox");
777
- assert.deepEqual(lowered.appendContainsMany, {
778
- base: "appendContainsMany",
779
- deterministic: true,
780
- label: "Add a note"
781
- }, "the label rides beside the rest of the lowered declaration");
782
- assert.false("label" in lowered.reopen, "a declaration without a label lowers exactly as before");
783
- let context = {
784
- definition: buildDefinition(Inbox),
785
- lookupDefinition,
786
- identifyCard: (target) => identifyCard(target)
787
- };
788
- let refused = await lowerOperationDeclarations({
789
- empty: {
790
- base: "update",
791
- label: " "
792
- },
793
- long: {
794
- base: "update",
795
- label: "x".repeat(81)
796
- },
797
- markup: {
798
- base: "update",
799
- label: "<b>Archive</b>"
800
- },
801
- multiline: {
802
- base: "update",
803
- label: "Archive\nthis inbox"
804
- },
805
- notText: {
806
- base: "update",
807
- label: 42
808
- }
809
- }, context);
810
- assert.deepEqual(refused.issues.map((issue) => `${issue.operation} ${issue.path}: ${issue.code}`), [
811
- "empty label: invalid-label",
812
- "long label: invalid-label",
813
- "markup label: invalid-label",
814
- "multiline label: invalid-label",
815
- "notText label: invalid-label"
816
- ]);
817
- for (let name of Object.keys(refused.operations)) {
818
- assert.true(refused.operations[name].invalid, `${name} is invalid`);
819
- assert.false("label" in refused.operations[name], `${name} stores no label`);
820
- assert.deepEqual(refused.operations[name].issues?.map((issue) => issue.code), ["invalid-label"], `${name} carries its finding`);
821
- }
822
- });
823
- (0, import_qunit.test)("an explain lowers to its params, and is non-grantable whatever reaches lowering", async function(assert) {
824
- let { CardDef } = api;
825
- let { operation } = operations;
826
- class Policy extends CardDef {
827
- static displayName = "Policy";
828
- static {
829
- decorateFieldV2(this, "explain", [operation], function() {
830
- return {
831
- base: "explain",
832
- params: {
833
- actor: StringField,
834
- target: StringField,
835
- operation: StringField
836
- },
837
- nonGrantable: true
838
- };
839
- });
840
- }
841
- #explain = (initializeDeferredDecorator(this, "explain"), void 0);
842
- }
843
- shim({ Policy });
844
- let { operations: lowered, issues } = await lower(Policy);
845
- assert.deepEqual(issues, [], "the declaration lowers clean");
846
- assert.strictEqual(lowered.explain.base, "explain");
847
- assert.deepEqual(Object.keys(lowered.explain.params ?? {}).sort(), [
848
- "actor",
849
- "operation",
850
- "target"
851
- ], "the question travels as declared params");
852
- assert.true(lowered.explain.nonGrantable, "the flag reaches the realm");
853
- let context = {
854
- definition: buildDefinition(Policy),
855
- lookupDefinition,
856
- identifyCard: (target) => identifyCard(target)
857
- };
858
- let unmarked = await lowerOperationDeclarations({ explain: { base: "explain" } }, context);
859
- assert.true(unmarked.operations.explain.nonGrantable, "an explain is never grantable, flag or no flag");
860
- let projected = await lowerOperationDeclarations({ explain: {
861
- base: "explain",
862
- nonGrantable: true,
863
- output: { decision: { $bxl: ".decision" } }
864
- } }, context);
865
- assert.deepEqual(codes(projected), ["unrunnable-program"], "a projection over the explanation is recorded as never reached");
866
- assert.true(projected.operations.explain.invalid);
867
- });
868
- (0, import_qunit.test)("a validate lowers with no payload, and is non-grantable whatever reaches lowering", async function(assert) {
869
- let { CardDef } = api;
870
- let { operation } = operations;
871
- class Policy extends CardDef {
872
- static displayName = "Policy";
873
- static {
874
- decorateFieldV2(this, "validate", [operation], function() {
875
- return {
876
- base: "validate",
877
- nonGrantable: true
878
- };
879
- });
880
- }
881
- #validate = (initializeDeferredDecorator(this, "validate"), void 0);
882
- }
883
- shim({ Policy });
884
- let { operations: lowered, issues } = await lower(Policy);
885
- assert.deepEqual(issues, [], "the declaration lowers clean");
886
- assert.strictEqual(lowered.validate.base, "validate");
887
- assert.true(lowered.validate.nonGrantable, "the flag reaches the realm");
888
- let context = {
889
- definition: buildDefinition(Policy),
890
- lookupDefinition,
891
- identifyCard: (target) => identifyCard(target)
892
- };
893
- let unmarked = await lowerOperationDeclarations({ validate: { base: "validate" } }, context);
894
- assert.true(unmarked.operations.validate.nonGrantable, "a validate is never grantable, flag or no flag");
895
- let projected = await lowerOperationDeclarations({ validate: {
896
- base: "validate",
897
- nonGrantable: true,
898
- output: { issues: { $bxl: ".issues" } }
899
- } }, context);
900
- assert.deepEqual(codes(projected), ["unrunnable-program"], "a projection over the validation is recorded as never reached");
901
- assert.true(projected.operations.validate.invalid);
902
- let withPayload = await lowerOperationDeclarations({ validate: {
903
- base: "validate",
904
- nonGrantable: true,
905
- params: { realm: { type: "string" } },
906
- input: { $bxl: "{ strict: true }" }
907
- } }, context);
908
- assert.deepEqual(withPayload.issues.map((issue) => [issue.code, issue.path]), [["unrunnable-program", "params"], ["unrunnable-program", "input"]], "a payload stage on a validate is recorded as never read");
909
- assert.strictEqual(withPayload.operations.validate.params, void 0, "and no payload schema is stored for one");
910
- assert.strictEqual(withPayload.operations.validate.input, void 0);
911
- });
912
- (0, import_qunit.test)("an appendLine on a file def lowers to its payload and nothing else", async function(assert) {
913
- let { FileDef } = api;
914
- let { operation } = operations;
915
- class LogFile extends FileDef {
916
- static displayName = "LogFile";
917
- static {
918
- decorateFieldV2(this, "record", [operation], function() {
919
- return {
920
- base: "appendLine",
921
- params: { line: StringField }
922
- };
923
- });
924
- }
925
- #record = (initializeDeferredDecorator(this, "record"), void 0);
926
- }
927
- shim({ LogFile });
928
- let { operations: lowered, issues } = await lower(LogFile);
929
- assert.deepEqual(issues, [], "the declaration lowers cleanly");
930
- assert.deepEqual(lowered.record, {
931
- base: "appendLine",
932
- params: { line: {
933
- kind: "field",
934
- codeRef: identifyCard(StringField)
935
- } },
936
- deterministic: true
937
- }, "there is no program: the base operation appends the line the payload carries");
938
- });
939
- (0, import_qunit.test)("an appendContainsMany keeps its item a marker-carrying template, per field", async function(assert) {
940
- let { field, contains, containsMany, CardDef } = api;
941
- let { operation, params, linkTo } = operations;
942
- class EventLog extends CardDef {
943
- static displayName = "EventLog";
944
- static {
945
- decorateFieldV2(this.prototype, "title", [field], function() {
946
- return contains(StringField);
947
- });
948
- }
949
- #title = (initializeDeferredDecorator(this, "title"), void 0);
950
- static {
951
- decorateFieldV2(this.prototype, "events", [field], function() {
952
- return containsMany(fixtures.Comment);
953
- });
954
- }
955
- #events = (initializeDeferredDecorator(this, "events"), void 0);
956
- static {
957
- decorateFieldV2(this.prototype, "labels", [field], function() {
958
- return containsMany(StringField);
959
- });
960
- }
961
- #labels = (initializeDeferredDecorator(this, "labels"), void 0);
962
- static {
963
- decorateFieldV2(this, "log", [operation], function() {
964
- return {
965
- base: "appendContainsMany",
966
- params: {
967
- body: StringField,
968
- author: linkTo(() => fixtures.Author)
969
- },
970
- field: "events",
971
- item: {
972
- body: params("body"),
973
- author: params("author")
974
- }
975
- };
976
- });
977
- }
978
- #log = (initializeDeferredDecorator(this, "log"), void 0);
979
- static {
980
- decorateFieldV2(this, "logBoth", [operation], function() {
981
- return {
982
- base: "appendContainsMany",
983
- params: {
984
- body: StringField,
985
- label: StringField
986
- },
987
- fields: {
988
- events: { body: params("body") },
989
- labels: params("label")
990
- }
991
- };
992
- });
993
- }
994
- #logBoth = (initializeDeferredDecorator(this, "logBoth"), void 0);
995
- }
996
- shim({ EventLog });
997
- let { operations: lowered, issues } = await lower(EventLog);
998
- assert.deepEqual(issues, [], "both declarations lower cleanly");
999
- assert.deepEqual(lowered.log.items, { events: {
1000
- body: {
1001
- $ref: "params",
1002
- key: "body"
1003
- },
1004
- author: {
1005
- $ref: "params",
1006
- key: "author"
1007
- }
1008
- } }, "the item reaches the realm as data to substitute into the stored file, not as a program");
1009
- assert.strictEqual(lowered.log.program, void 0, "an append runs no BXL at all");
1010
- assert.deepEqual(lowered.logBoth.items, {
1011
- events: { body: {
1012
- $ref: "params",
1013
- key: "body"
1014
- } },
1015
- labels: {
1016
- $ref: "params",
1017
- key: "label"
1018
- }
1019
- }, "each named field carries its own item, and a collection of primitives takes a bare value");
1020
- });
1021
- (0, import_qunit.test)("an item member is lowered against the field it lands in", async function(assert) {
1022
- let { field, containsMany, CardDef } = api;
1023
- let { operation, actor } = operations;
1024
- class EventLog extends CardDef {
1025
- static displayName = "EventLog";
1026
- static {
1027
- decorateFieldV2(this.prototype, "events", [field], function() {
1028
- return containsMany(fixtures.Comment);
1029
- });
1030
- }
1031
- #events = (initializeDeferredDecorator(this, "events"), void 0);
1032
- static {
1033
- decorateFieldV2(this, "log", [operation], function() {
1034
- return {
1035
- base: "appendContainsMany",
1036
- field: "events",
1037
- item: {
1038
- body: actor(),
1039
- author: actor()
1040
- }
1041
- };
1042
- });
1043
- }
1044
- #log = (initializeDeferredDecorator(this, "log"), void 0);
1045
- }
1046
- shim({ EventLog });
1047
- let result = await lower(EventLog);
1048
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["actor-not-a-card", "item.author"]], "only the member whose field is a link is refused");
1049
- assert.deepEqual(result.operations.log.items, { events: {
1050
- body: { $ref: "actor" },
1051
- author: { $ref: "actor" }
1052
- } }, "and both are stored as written, so invoking it reports the finding");
1053
- });
1054
- (0, import_qunit.test)("a realmConfig reference lowers to the builtin in a program and stays a marker in a template", async function(assert) {
1055
- let { field, contains, containsMany, CardDef } = api;
1056
- let { operation, realmConfig } = operations;
1057
- class Report extends CardDef {
1058
- static displayName = "Report";
1059
- static {
1060
- decorateFieldV2(this.prototype, "status", [field], function() {
1061
- return contains(StringField);
1062
- });
1063
- }
1064
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1065
- static {
1066
- decorateFieldV2(this.prototype, "tags", [field], function() {
1067
- return containsMany(StringField);
1068
- });
1069
- }
1070
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
1071
- static {
1072
- decorateFieldV2(this.prototype, "events", [field], function() {
1073
- return containsMany(fixtures.Comment);
1074
- });
1075
- }
1076
- #events = (initializeDeferredDecorator(this, "events"), void 0);
1077
- static {
1078
- decorateFieldV2(this, "escalate", [operation], function() {
1079
- return {
1080
- base: "transform",
1081
- set: { status: realmConfig("escalatedStatus") },
1082
- append: {
1083
- to: "tags",
1084
- value: realmConfig()
1085
- }
1086
- };
1087
- });
1088
- }
1089
- #escalate = (initializeDeferredDecorator(this, "escalate"), void 0);
1090
- static {
1091
- decorateFieldV2(this, "logDefault", [operation], function() {
1092
- return {
1093
- base: "appendContainsMany",
1094
- field: "events",
1095
- item: { body: realmConfig("defaultNote") }
1096
- };
1097
- });
1098
- }
1099
- #logDefault = (initializeDeferredDecorator(this, "logDefault"), void 0);
1100
- static {
1101
- decorateFieldV2(this, "open", [operation], function() {
1102
- return {
1103
- base: "create",
1104
- of: () => fixtures.Activity,
1105
- fill: { label: realmConfig("defaultLabel") }
1106
- };
1107
- });
1108
- }
1109
- #open = (initializeDeferredDecorator(this, "open"), void 0);
1110
- }
1111
- shim({ Report });
1112
- let { operations: lowered, issues } = await lower(Report);
1113
- assert.deepEqual(issues, [], "a setting name is never checked here");
1114
- assert.strictEqual(lowered.escalate.program?.source, ".status=realmConfig(\"escalatedStatus\");\nappend(.tags;realmConfig());", "the marker lowers to the builtin of the same name, with and without a setting to read");
1115
- assert.deepEqual(lowered.logDefault.items, { events: { body: {
1116
- $ref: "realmConfig",
1117
- key: "defaultNote"
1118
- } } }, "a template carries the marker rather than a value, since which realm the operation runs in is not known here");
1119
- assert.deepEqual(lowered.open.fill, { label: {
1120
- $ref: "realmConfig",
1121
- key: "defaultLabel"
1122
- } }, "the same in a create");
1123
- assert.true(lowered.escalate.deterministic, "a realm setting is fixed for a given request, the way the rest of the context is");
1124
- });
1125
- (0, import_qunit.test)("a volatile call makes an operation non-deterministic; the request context does not", async function(assert) {
1126
- let { field, contains, CardDef } = api;
1127
- let { operation, params, actor, bxl } = operations;
1128
- class Report extends CardDef {
1129
- static displayName = "Report";
1130
- static {
1131
- decorateFieldV2(this.prototype, "title", [field], function() {
1132
- return contains(StringField);
1133
- });
1134
- }
1135
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1136
- static {
1137
- decorateFieldV2(this, "stamped", [operation], function() {
1138
- return {
1139
- base: "read",
1140
- output: bxl`{ label: .title, at: TODAY() }`
1141
- };
1142
- });
1143
- }
1144
- #stamped = (initializeDeferredDecorator(this, "stamped"), void 0);
1145
- static {
1146
- decorateFieldV2(this, "contextual", [operation], function() {
1147
- return {
1148
- base: "transform",
1149
- params: { note: StringField },
1150
- set: { title: params("note") },
1151
- output: { who: actor() }
1152
- };
1153
- });
1154
- }
1155
- #contextual = (initializeDeferredDecorator(this, "contextual"), void 0);
1156
- }
1157
- shim({ Report });
1158
- let { operations: lowered } = await lower(Report);
1159
- assert.false(lowered.stamped.deterministic, "TODAY() yields a different value on every run, so the ledger cannot replay it locally");
1160
- assert.true(lowered.contextual.deterministic, "params(), actor() and instance() are fixed for a given request");
1161
- });
1162
- (0, import_qunit.test)("a field named after a volatile builtin is not read as a call", async function(assert) {
1163
- let { field, contains, CardDef } = api;
1164
- let { operation } = operations;
1165
- class Report extends CardDef {
1166
- static displayName = "Report";
1167
- static {
1168
- decorateFieldV2(this.prototype, "today", [field], function() {
1169
- return contains(StringField);
1170
- });
1171
- }
1172
- #today = (initializeDeferredDecorator(this, "today"), void 0);
1173
- static {
1174
- decorateFieldV2(this, "touch", [operation], function() {
1175
- return {
1176
- base: "transform",
1177
- set: { today: "noted" }
1178
- };
1179
- });
1180
- }
1181
- #touch = (initializeDeferredDecorator(this, "touch"), void 0);
1182
- }
1183
- shim({ Report });
1184
- let { operations: lowered } = await lower(Report);
1185
- assert.strictEqual(lowered.touch.program?.source, ".today=\"noted\";");
1186
- assert.true(lowered.touch.deterministic, "a field access is not a volatile call");
1187
- });
1188
- (0, import_qunit.test)("a clause naming a field the type does not have is recorded", async function(assert) {
1189
- let { field, contains, CardDef } = api;
1190
- let { operation } = operations;
1191
- class Report extends CardDef {
1192
- static displayName = "Report";
1193
- static {
1194
- decorateFieldV2(this.prototype, "title", [field], function() {
1195
- return contains(StringField);
1196
- });
1197
- }
1198
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1199
- static {
1200
- decorateFieldV2(this, "close", [operation], function() {
1201
- return {
1202
- base: "transform",
1203
- set: { staus: "closed" }
1204
- };
1205
- });
1206
- }
1207
- #close = (initializeDeferredDecorator(this, "close"), void 0);
1208
- }
1209
- shim({ Report });
1210
- let result = await lower(Report);
1211
- assert.deepEqual(codes(result), ["unknown-field"]);
1212
- assert.strictEqual(result.issues[0].operation, "close");
1213
- assert.strictEqual(result.issues[0].path, "set.staus");
1214
- assert.strictEqual(result.issues[0].message, "\"staus\" is not a field of this type");
1215
- let lowered = result.operations.close;
1216
- assert.true(lowered.invalid, "the operation is stored flagged invalid, so invoking it reports the problem rather than reading as unknown");
1217
- assert.deepEqual(lowered.issues, result.issues);
1218
- assert.strictEqual(lowered.program, void 0, "and carries no program, since the statement it would have emitted names nothing");
1219
- });
1220
- (0, import_qunit.test)("an unknown field inside an appended value is recorded at whatever depth it sits", async function(assert) {
1221
- let { field, contains, containsMany, CardDef } = api;
1222
- let { operation, params } = operations;
1223
- class Report extends CardDef {
1224
- static displayName = "Report";
1225
- static {
1226
- decorateFieldV2(this.prototype, "comments", [field], function() {
1227
- return containsMany(fixtures.Comment);
1228
- });
1229
- }
1230
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1231
- static {
1232
- decorateFieldV2(this.prototype, "title", [field], function() {
1233
- return contains(StringField);
1234
- });
1235
- }
1236
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1237
- static {
1238
- decorateFieldV2(this, "addComment", [operation], function() {
1239
- return {
1240
- base: "transform",
1241
- params: {
1242
- body: StringField,
1243
- city: StringField
1244
- },
1245
- append: {
1246
- to: "comments",
1247
- value: {
1248
- body: params("body"),
1249
- bdy: "x",
1250
- where: {
1251
- city: params("city"),
1252
- citty: "x"
1253
- }
1254
- }
1255
- }
1256
- };
1257
- });
1258
- }
1259
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
1260
- }
1261
- shim({ Report });
1262
- let result = await lower(Report);
1263
- assert.deepEqual(codes(result), ["unknown-field", "unknown-field"]);
1264
- assert.deepEqual(result.issues.map((issue) => issue.path), ["append.value.bdy", "append.value.where.citty"]);
1265
- assert.true(result.issues[0].message.includes("Comment"), "the message names the item type the key was checked against");
1266
- assert.true(result.issues[1].message.includes("Address"), "and the nested key is checked against the type that actually holds it");
1267
- });
1268
- (0, import_qunit.test)("params() for a key the schema does not declare is refused in a clause and recorded in a program", async function(assert) {
1269
- let { field, contains, CardDef } = api;
1270
- let { operation, params, bxl } = operations;
1271
- assert.throws(() => {
1272
- class Flawed extends CardDef {
1273
- static displayName = "Flawed";
1274
- static {
1275
- decorateFieldV2(this.prototype, "status", [field], function() {
1276
- return contains(StringField);
1277
- });
1278
- }
1279
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1280
- static {
1281
- decorateFieldV2(this, "close", [operation], function() {
1282
- return {
1283
- base: "transform",
1284
- params: { note: StringField },
1285
- set: { status: params("reason") }
1286
- };
1287
- });
1288
- }
1289
- #close = (initializeDeferredDecorator(this, "close"), void 0);
1290
- }
1291
- return Flawed;
1292
- }, /references the param "reason", which the `params` schema does not declare/, "an undeclared param in a clause never reaches lowering");
1293
- class Report extends CardDef {
1294
- static displayName = "Report";
1295
- static {
1296
- decorateFieldV2(this.prototype, "status", [field], function() {
1297
- return contains(StringField);
1298
- });
1299
- }
1300
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1301
- static {
1302
- decorateFieldV2(this, "raw", [operation], function() {
1303
- return {
1304
- base: "transform",
1305
- params: { note: StringField },
1306
- transformations: bxl`.status = params("reason");`
1307
- };
1308
- });
1309
- }
1310
- #raw = (initializeDeferredDecorator(this, "raw"), void 0);
1311
- }
1312
- shim({ Report });
1313
- let result = await lower(Report);
1314
- assert.deepEqual(codes(result), ["undeclared-param"]);
1315
- assert.deepEqual(result.issues.map((issue) => issue.operation), ["raw"]);
1316
- assert.strictEqual(result.issues[0].path, "transformations", "the finding points at the program rather than at a clause");
1317
- });
1318
- (0, import_qunit.test)("card() naming a link identity lowers the same as naming it bare", async function(assert) {
1319
- let { field, contains, linksTo, linksToMany, CardDef } = api;
1320
- let { operation, params, card, linkTo } = operations;
1321
- class Report extends CardDef {
1322
- static displayName = "Report";
1323
- static {
1324
- decorateFieldV2(this.prototype, "title", [field], function() {
1325
- return contains(StringField);
1326
- });
1327
- }
1328
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1329
- static {
1330
- decorateFieldV2(this.prototype, "owner", [field], function() {
1331
- return linksTo(() => fixtures.Author);
1332
- });
1333
- }
1334
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1335
- static {
1336
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1337
- return linksToMany(() => fixtures.Author, { searchable: true });
1338
- });
1339
- }
1340
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1341
- static {
1342
- decorateFieldV2(this, "assignBare", [operation], function() {
1343
- return {
1344
- base: "transform",
1345
- params: { who: linkTo(() => fixtures.Author) },
1346
- set: { owner: params("who") }
1347
- };
1348
- });
1349
- }
1350
- #assignBare = (initializeDeferredDecorator(this, "assignBare"), void 0);
1351
- static {
1352
- decorateFieldV2(this, "assignExplicit", [operation], function() {
1353
- return {
1354
- base: "transform",
1355
- params: { who: linkTo(() => fixtures.Author) },
1356
- set: { owner: card(params("who")) }
1357
- };
1358
- });
1359
- }
1360
- #assignExplicit = (initializeDeferredDecorator(this, "assignExplicit"), void 0);
1361
- static {
1362
- decorateFieldV2(this, "enrolExplicit", [operation], function() {
1363
- return {
1364
- base: "transform",
1365
- params: { who: linkTo(() => fixtures.Author) },
1366
- append: {
1367
- to: "reviewers",
1368
- value: card(params("who"))
1369
- }
1370
- };
1371
- });
1372
- }
1373
- #enrolExplicit = (initializeDeferredDecorator(this, "enrolExplicit"), void 0);
1374
- }
1375
- shim({ Report });
1376
- let { operations: lowered, issues } = await lower(Report);
1377
- assert.deepEqual(issues, [], "the declarations lower cleanly");
1378
- assert.strictEqual(lowered.assignExplicit.program?.source, ".owner=card(params(\"who\"));");
1379
- assert.strictEqual(lowered.assignBare.program?.source, lowered.assignExplicit.program?.source, "the two spellings are the same program");
1380
- assert.strictEqual(lowered.enrolExplicit.program?.source, "append(.reviewers;card(params(\"who\")));");
1381
- });
1382
- (0, import_qunit.test)("a contained value written whole may leave its link empty", async function(assert) {
1383
- let { field, contains, containsMany, CardDef } = api;
1384
- let { operation, params } = operations;
1385
- class Report extends CardDef {
1386
- static displayName = "Report";
1387
- static {
1388
- decorateFieldV2(this.prototype, "title", [field], function() {
1389
- return contains(StringField);
1390
- });
1391
- }
1392
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1393
- static {
1394
- decorateFieldV2(this.prototype, "comments", [field], function() {
1395
- return containsMany(fixtures.Comment);
1396
- });
1397
- }
1398
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1399
- static {
1400
- decorateFieldV2(this, "addComment", [operation], function() {
1401
- return {
1402
- base: "transform",
1403
- params: { body: StringField },
1404
- append: {
1405
- to: "comments",
1406
- value: {
1407
- body: params("body"),
1408
- author: null
1409
- }
1410
- }
1411
- };
1412
- });
1413
- }
1414
- #addComment = (initializeDeferredDecorator(this, "addComment"), void 0);
1415
- }
1416
- shim({ Report });
1417
- let result = await lower(Report);
1418
- assert.deepEqual(codes(result), []);
1419
- assert.strictEqual(result.operations.addComment.program?.source, "append(.comments;{body:params(\"body\"),author:null});");
1420
- assert.notOk(result.operations.addComment.invalid);
1421
- });
1422
- (0, import_qunit.test)("a value in a link position that is not a card identity is recorded", async function(assert) {
1423
- let { field, contains, linksTo, linksToMany, CardDef } = api;
1424
- let { operation } = operations;
1425
- class Report extends CardDef {
1426
- static displayName = "Report";
1427
- static {
1428
- decorateFieldV2(this.prototype, "title", [field], function() {
1429
- return contains(StringField);
1430
- });
1431
- }
1432
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1433
- static {
1434
- decorateFieldV2(this.prototype, "owner", [field], function() {
1435
- return linksTo(() => fixtures.Author);
1436
- });
1437
- }
1438
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1439
- static {
1440
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1441
- return linksToMany(() => fixtures.Author, { searchable: true });
1442
- });
1443
- }
1444
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1445
- static {
1446
- decorateFieldV2(this, "misassign", [operation], function() {
1447
- return {
1448
- base: "transform",
1449
- set: { owner: { name: "Ada" } }
1450
- };
1451
- });
1452
- }
1453
- #misassign = (initializeDeferredDecorator(this, "misassign"), void 0);
1454
- static {
1455
- decorateFieldV2(this, "unassign", [operation], function() {
1456
- return {
1457
- base: "transform",
1458
- set: { owner: null }
1459
- };
1460
- });
1461
- }
1462
- #unassign = (initializeDeferredDecorator(this, "unassign"), void 0);
1463
- static {
1464
- decorateFieldV2(this, "misappend", [operation], function() {
1465
- return {
1466
- base: "transform",
1467
- append: {
1468
- to: "reviewers",
1469
- value: 7
1470
- }
1471
- };
1472
- });
1473
- }
1474
- #misappend = (initializeDeferredDecorator(this, "misappend"), void 0);
1475
- }
1476
- shim({ Report });
1477
- let result = await lower(Report);
1478
- assert.deepEqual(codes(result), [
1479
- "link-requires-identity",
1480
- "link-requires-identity",
1481
- "link-requires-identity"
1482
- ]);
1483
- assert.deepEqual(result.issues.map((issue) => issue.path), [
1484
- "set.owner",
1485
- "set.owner",
1486
- "append.value"
1487
- ]);
1488
- assert.true(result.issues[1].message.includes("already empty"), "clearing a link is called out as its own missing spelling rather than as a bad value");
1489
- for (let name of [
1490
- "misassign",
1491
- "unassign",
1492
- "misappend"
1493
- ]) assert.true(result.operations[name].invalid, `${name} is flagged rather than stored as though it would run`);
1494
- });
1495
- (0, import_qunit.test)("a write into a computed field is recorded", async function(assert) {
1496
- let { field, contains, CardDef } = api;
1497
- let { operation } = operations;
1498
- class Report extends CardDef {
1499
- static displayName = "Report";
1500
- static {
1501
- decorateFieldV2(this.prototype, "title", [field], function() {
1502
- return contains(StringField);
1503
- });
1504
- }
1505
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1506
- static {
1507
- decorateFieldV2(this.prototype, "slug", [field], function() {
1508
- return contains(StringField, { computeVia: function() {
1509
- return this.title;
1510
- } });
1511
- });
1512
- }
1513
- #slug = (initializeDeferredDecorator(this, "slug"), void 0);
1514
- static {
1515
- decorateFieldV2(this, "rename", [operation], function() {
1516
- return {
1517
- base: "transform",
1518
- set: { slug: "x" }
1519
- };
1520
- });
1521
- }
1522
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1523
- }
1524
- shim({ Report });
1525
- let result = await lower(Report);
1526
- assert.deepEqual(codes(result), ["computed-write"]);
1527
- assert.strictEqual(result.issues[0].path, "set.slug");
1528
- });
1529
- (0, import_qunit.test)("a write through a link is recorded", async function(assert) {
1530
- let { field, contains, linksTo, CardDef } = api;
1531
- let { operation } = operations;
1532
- class Report extends CardDef {
1533
- static displayName = "Report";
1534
- static {
1535
- decorateFieldV2(this.prototype, "title", [field], function() {
1536
- return contains(StringField);
1537
- });
1538
- }
1539
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1540
- static {
1541
- decorateFieldV2(this.prototype, "owner", [field], function() {
1542
- return linksTo(() => fixtures.Author, { searchable: true });
1543
- });
1544
- }
1545
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1546
- static {
1547
- decorateFieldV2(this, "rename", [operation], function() {
1548
- return {
1549
- base: "transform",
1550
- set: { "owner.name": "x" }
1551
- };
1552
- });
1553
- }
1554
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1555
- }
1556
- shim({ Report });
1557
- let result = await lower(Report);
1558
- assert.deepEqual(codes(result), ["write-through-link"]);
1559
- assert.strictEqual(result.issues[0].path, "set.owner.name", "an operation binds to its target card, not to the cards it links to");
1560
- });
1561
- (0, import_qunit.test)("a read through a link that is not searchable is recorded", async function(assert) {
1562
- let { field, containsMany, linksTo, CardDef } = api;
1563
- let { operation, params } = operations;
1564
- class Tagger extends CardDef {
1565
- static displayName = "Tagger";
1566
- static {
1567
- decorateFieldV2(this.prototype, "tags", [field], function() {
1568
- return containsMany(StringField);
1569
- });
1570
- }
1571
- #tags = (initializeDeferredDecorator(this, "tags"), void 0);
1572
- }
1573
- shim({ Tagger });
1574
- class Report extends CardDef {
1575
- static displayName = "Report";
1576
- static {
1577
- decorateFieldV2(this.prototype, "owner", [field], function() {
1578
- return linksTo(() => Tagger);
1579
- });
1580
- }
1581
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
1582
- static {
1583
- decorateFieldV2(this, "claim", [operation], function() {
1584
- return {
1585
- base: "transform",
1586
- params: { who: StringField },
1587
- assert: {
1588
- unique: "owner.tags",
1589
- by: params("who"),
1590
- snapshot: true
1591
- }
1592
- };
1593
- });
1594
- }
1595
- #claim = (initializeDeferredDecorator(this, "claim"), void 0);
1596
- }
1597
- shim({ Report });
1598
- let result = await lower(Report);
1599
- assert.deepEqual(codes(result), ["unsearchable-read"]);
1600
- assert.true(result.issues[0].message.includes("searchable"), "the message says what makes a linked card's values reachable");
1601
- });
1602
- (0, import_qunit.test)("an assert over computed or linked values without a snapshot is recorded", async function(assert) {
1603
- let { field, contains, linksToMany, CardDef } = api;
1604
- let { operation, params } = operations;
1605
- class Report extends CardDef {
1606
- static displayName = "Report";
1607
- static {
1608
- decorateFieldV2(this.prototype, "title", [field], function() {
1609
- return contains(StringField);
1610
- });
1611
- }
1612
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1613
- static {
1614
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1615
- return linksToMany(() => fixtures.Author, { searchable: true });
1616
- });
1617
- }
1618
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1619
- static {
1620
- decorateFieldV2(this, "addReviewer", [operation], function() {
1621
- return {
1622
- base: "transform",
1623
- params: { who: StringField },
1624
- assert: {
1625
- unique: "reviewers",
1626
- by: params("who")
1627
- }
1628
- };
1629
- });
1630
- }
1631
- #addReviewer = (initializeDeferredDecorator(this, "addReviewer"), void 0);
1632
- }
1633
- shim({ Report });
1634
- let result = await lower(Report);
1635
- assert.deepEqual(codes(result), ["unsnapshotted-assert"]);
1636
- assert.true(result.issues[0].message.includes("snapshot: true"), "the message names the clause that resolves it");
1637
- assert.strictEqual(result.operations.addReviewer.program?.source, "assert(all(.reviewers[];.id!=params(\"who\"));\"reviewers already holds this value\");", "the program is still emitted, so the operation says what it would do");
1638
- });
1639
- (0, import_qunit.test)("replacing a whole link collection is recorded — a relationship changes one edge at a time", async function(assert) {
1640
- let { field, contains, linksToMany, CardDef } = api;
1641
- let { operation, params } = operations;
1642
- class Report extends CardDef {
1643
- static displayName = "Report";
1644
- static {
1645
- decorateFieldV2(this.prototype, "title", [field], function() {
1646
- return contains(StringField);
1647
- });
1648
- }
1649
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1650
- static {
1651
- decorateFieldV2(this.prototype, "reviewers", [field], function() {
1652
- return linksToMany(() => fixtures.Author);
1653
- });
1654
- }
1655
- #reviewers = (initializeDeferredDecorator(this, "reviewers"), void 0);
1656
- static {
1657
- decorateFieldV2(this, "reassign", [operation], function() {
1658
- return {
1659
- base: "transform",
1660
- params: { who: StringField },
1661
- set: { reviewers: [params("who")] }
1662
- };
1663
- });
1664
- }
1665
- #reassign = (initializeDeferredDecorator(this, "reassign"), void 0);
1666
- }
1667
- shim({ Report });
1668
- let result = await lower(Report);
1669
- assert.deepEqual(codes(result), ["link-collection-replace"]);
1670
- assert.true(result.issues[0].message.includes("append"), "the message names the clause that does express the change");
1671
- assert.strictEqual(result.operations.reassign.program, void 0, "and no program is emitted, since an assignment here is not executable");
1672
- });
1673
- (0, import_qunit.test)("a write into a query-backed field or into `id` is recorded", async function(assert) {
1674
- let { field, contains, linksTo, CardDef } = api;
1675
- let { operation } = operations;
1676
- class Report extends CardDef {
1677
- static displayName = "Report";
1678
- static {
1679
- decorateFieldV2(this.prototype, "title", [field], function() {
1680
- return contains(StringField);
1681
- });
1682
- }
1683
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1684
- static {
1685
- decorateFieldV2(this.prototype, "featured", [field], function() {
1686
- return linksTo(() => fixtures.Author, { query: { filter: { type: {
1687
- module: `${testRealmURL}author`,
1688
- name: "Author"
1689
- } } } });
1690
- });
1691
- }
1692
- #featured = (initializeDeferredDecorator(this, "featured"), void 0);
1693
- static {
1694
- decorateFieldV2(this, "feature", [operation], function() {
1695
- return {
1696
- base: "transform",
1697
- set: { featured: "http://example.com/a" }
1698
- };
1699
- });
1700
- }
1701
- #feature = (initializeDeferredDecorator(this, "feature"), void 0);
1702
- static {
1703
- decorateFieldV2(this, "rename", [operation], function() {
1704
- return {
1705
- base: "transform",
1706
- set: { id: "http://example.com/r" }
1707
- };
1708
- });
1709
- }
1710
- #rename = (initializeDeferredDecorator(this, "rename"), void 0);
1711
- }
1712
- shim({ Report });
1713
- let result = await lower(Report);
1714
- assert.deepEqual(codes(result), ["read-only-write", "read-only-write"]);
1715
- assert.true(result.issues[0].message.includes("query"), "a query-backed field holds no stored value to write");
1716
- assert.true(result.issues[1].message.includes("identity"), "and `id` is the card's identity rather than its data");
1717
- });
1718
- (0, import_qunit.test)("a path that continues past a collection is recorded — no item is named", async function(assert) {
1719
- let { field, contains, containsMany, CardDef } = api;
1720
- let { operation } = operations;
1721
- class Report extends CardDef {
1722
- static displayName = "Report";
1723
- static {
1724
- decorateFieldV2(this.prototype, "title", [field], function() {
1725
- return contains(StringField);
1726
- });
1727
- }
1728
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1729
- static {
1730
- decorateFieldV2(this.prototype, "comments", [field], function() {
1731
- return containsMany(fixtures.Comment);
1732
- });
1733
- }
1734
- #comments = (initializeDeferredDecorator(this, "comments"), void 0);
1735
- static {
1736
- decorateFieldV2(this, "editComment", [operation], function() {
1737
- return {
1738
- base: "transform",
1739
- set: { "comments.body": "z" }
1740
- };
1741
- });
1742
- }
1743
- #editComment = (initializeDeferredDecorator(this, "editComment"), void 0);
1744
- }
1745
- shim({ Report });
1746
- let result = await lower(Report);
1747
- assert.deepEqual(codes(result), ["path-crosses-collection"]);
1748
- assert.true(result.issues[0].message.includes("which item"), "the message says what the declaration cannot express");
1749
- });
1750
- (0, import_qunit.test)("appending to a field that holds one value is recorded", async function(assert) {
1751
- let { field, contains, CardDef } = api;
1752
- let { operation } = operations;
1753
- class Report extends CardDef {
1754
- static displayName = "Report";
1755
- static {
1756
- decorateFieldV2(this.prototype, "title", [field], function() {
1757
- return contains(StringField);
1758
- });
1759
- }
1760
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1761
- static {
1762
- decorateFieldV2(this, "addTitle", [operation], function() {
1763
- return {
1764
- base: "transform",
1765
- append: {
1766
- to: "title",
1767
- value: "x"
1768
- }
1769
- };
1770
- });
1771
- }
1772
- #addTitle = (initializeDeferredDecorator(this, "addTitle"), void 0);
1773
- }
1774
- shim({ Report });
1775
- let result = await lower(Report);
1776
- assert.deepEqual(codes(result), ["not-a-collection"]);
1777
- });
1778
- (0, import_qunit.test)("a raw program that does not parse is recorded", async function(assert) {
1779
- let { field, contains, CardDef } = api;
1780
- let { operation, bxl } = operations;
1781
- class Report extends CardDef {
1782
- static displayName = "Report";
1783
- static {
1784
- decorateFieldV2(this.prototype, "status", [field], function() {
1785
- return contains(StringField);
1786
- });
1787
- }
1788
- #status = (initializeDeferredDecorator(this, "status"), void 0);
1789
- static {
1790
- decorateFieldV2(this, "broken", [operation], function() {
1791
- return {
1792
- base: "transform",
1793
- transformations: bxl`.status = ;`
1794
- };
1795
- });
1796
- }
1797
- #broken = (initializeDeferredDecorator(this, "broken"), void 0);
1798
- }
1799
- shim({ Report });
1800
- let result = await lower(Report);
1801
- assert.deepEqual(codes(result), ["invalid-program"]);
1802
- assert.strictEqual(result.issues[0].path, "transformations");
1803
- assert.true(result.operations.broken.invalid, "the operation is stored so invoking it reports the parse failure");
1804
- });
1805
- (0, import_qunit.test)("a class no module exports has no code ref to store", async function(assert) {
1806
- let { field, contains, CardDef } = api;
1807
- let { operation } = operations;
1808
- class Unexported extends CardDef {
1809
- static displayName = "Unexported";
1810
- static {
1811
- decorateFieldV2(this.prototype, "name", [field], function() {
1812
- return contains(StringField);
1813
- });
1814
- }
1815
- #name = (initializeDeferredDecorator(this, "name"), void 0);
1816
- }
1817
- class Report extends CardDef {
1818
- static displayName = "Report";
1819
- static {
1820
- decorateFieldV2(this.prototype, "title", [field], function() {
1821
- return contains(StringField);
1822
- });
1823
- }
1824
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1825
- static {
1826
- decorateFieldV2(this, "make", [operation], function() {
1827
- return {
1828
- base: "create",
1829
- of: () => Unexported
1830
- };
1831
- });
1832
- }
1833
- #make = (initializeDeferredDecorator(this, "make"), void 0);
1834
- }
1835
- shim({ Report });
1836
- let result = await lower(Report);
1837
- assert.deepEqual(codes(result), ["unresolved-type"]);
1838
- assert.strictEqual(result.issues[0].path, "of");
1839
- assert.strictEqual(result.operations.make.of, void 0);
1840
- });
1841
- (0, import_qunit.test)("a def that declares nothing lowers to nothing", async function(assert) {
1842
- let { field, contains, CardDef } = api;
1843
- class Plain extends CardDef {
1844
- static displayName = "Plain";
1845
- static {
1846
- decorateFieldV2(this.prototype, "title", [field], function() {
1847
- return contains(StringField);
1848
- });
1849
- }
1850
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1851
- }
1852
- shim({ Plain });
1853
- let result = await lower(Plain);
1854
- assert.deepEqual(result, {
1855
- operations: {},
1856
- issues: []
1857
- }, "the base operations a def type carries are not declarations, so there is nothing to lower");
1858
- });
1859
- (0, import_qunit.test)("a behavior the def type does not carry is refused rather than lowered", async function(assert) {
1860
- let { field, contains, containsMany, CardDef, FieldDef, FileDef } = api;
1861
- class Ledger extends CardDef {
1862
- static displayName = "Ledger";
1863
- static {
1864
- decorateFieldV2(this.prototype, "entries", [field], function() {
1865
- return containsMany(StringField);
1866
- });
1867
- }
1868
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
1869
- }
1870
- class Attachment extends FileDef {
1871
- static displayName = "Attachment";
1872
- }
1873
- class Caption extends FieldDef {
1874
- static displayName = "Caption";
1875
- static {
1876
- decorateFieldV2(this.prototype, "text", [field], function() {
1877
- return contains(StringField);
1878
- });
1879
- }
1880
- #text = (initializeDeferredDecorator(this, "text"), void 0);
1881
- }
1882
- shim({
1883
- Ledger,
1884
- Attachment,
1885
- Caption
1886
- });
1887
- let refused = [
1888
- [
1889
- "appendLine",
1890
- Ledger,
1891
- "card definition"
1892
- ],
1893
- [
1894
- "appendContainsMany",
1895
- Attachment,
1896
- "file definition"
1897
- ],
1898
- [
1899
- "transform",
1900
- Attachment,
1901
- "file definition"
1902
- ],
1903
- [
1904
- "create",
1905
- Caption,
1906
- "definition recorded as a field"
1907
- ]
1908
- ];
1909
- for (let [base, def, kindLabel] of refused) {
1910
- let result = await lowerOperationDeclarations({ doIt: { base } }, {
1911
- definition: buildDefinition(def),
1912
- lookupDefinition,
1913
- identifyCard: (target) => identifyCard(target)
1914
- });
1915
- assert.deepEqual(codes(result), ["base-not-carried"], `a ${kindLabel} cannot build an operation on "${base}"`);
1916
- assert.strictEqual(result.issues[0].path, "base");
1917
- assert.true(result.issues[0].message.includes(kindLabel), "the finding names the def kind");
1918
- assert.true(result.issues[0].message.includes(`"${base}"`), "and the behavior it cannot carry out");
1919
- assert.true(result.operations.doIt?.invalid, "the operation is stored flagged, so invoking it reports the refusal rather than reading as unknown");
1920
- }
1921
- class Addressable extends api.BaseDef {
1922
- static displayName = "Addressable";
1923
- }
1924
- shim({ Addressable });
1925
- assert.strictEqual(buildDefinition(Addressable).type, "field-def", "the two land under one recorded kind");
1926
- let addressable = await lowerOperationDeclarations({ readRedacted: {
1927
- base: "read",
1928
- output: { name: true }
1929
- } }, {
1930
- definition: buildDefinition(Addressable),
1931
- lookupDefinition,
1932
- identifyCard: (target) => identifyCard(target)
1933
- });
1934
- assert.deepEqual(codes(addressable), [], "so the read lowers");
1935
- assert.notOk(addressable.operations.readRedacted.invalid);
1936
- });
1937
- (0, import_qunit.test)("an append names a containsMany field the type actually has", async function(assert) {
1938
- let { field, contains, containsMany, linksToMany, CardDef } = api;
1939
- let { operation } = operations;
1940
- class Ledger extends CardDef {
1941
- static displayName = "Ledger";
1942
- static {
1943
- decorateFieldV2(this.prototype, "title", [field], function() {
1944
- return contains(StringField);
1945
- });
1946
- }
1947
- #title = (initializeDeferredDecorator(this, "title"), void 0);
1948
- static {
1949
- decorateFieldV2(this.prototype, "helpers", [field], function() {
1950
- return linksToMany(() => fixtures.Author);
1951
- });
1952
- }
1953
- #helpers = (initializeDeferredDecorator(this, "helpers"), void 0);
1954
- static {
1955
- decorateFieldV2(this.prototype, "entries", [field], function() {
1956
- return containsMany(StringField);
1957
- });
1958
- }
1959
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
1960
- static {
1961
- decorateFieldV2(this, "toScalar", [operation], function() {
1962
- return {
1963
- base: "appendContainsMany",
1964
- field: "title",
1965
- item: "x"
1966
- };
1967
- });
1968
- }
1969
- #toScalar = (initializeDeferredDecorator(this, "toScalar"), void 0);
1970
- static {
1971
- decorateFieldV2(this, "toLinks", [operation], function() {
1972
- return {
1973
- base: "appendContainsMany",
1974
- field: "helpers",
1975
- item: "https://example.test/people/1"
1976
- };
1977
- });
1978
- }
1979
- #toLinks = (initializeDeferredDecorator(this, "toLinks"), void 0);
1980
- static {
1981
- decorateFieldV2(this, "toNothing", [operation], function() {
1982
- return {
1983
- base: "appendContainsMany",
1984
- field: "entires",
1985
- item: "x"
1986
- };
1987
- });
1988
- }
1989
- #toNothing = (initializeDeferredDecorator(this, "toNothing"), void 0);
1990
- }
1991
- shim({ Ledger });
1992
- let result = await lower(Ledger);
1993
- assert.deepEqual(codes(result), [
1994
- "not-a-collection",
1995
- "not-a-collection",
1996
- "unknown-field"
1997
- ]);
1998
- assert.true(result.issues[1].message.includes("linksToMany"), "a link collection is not one a card holds in its own file, so an append cannot splice into it");
1999
- assert.strictEqual(result.issues[0].path, "field");
2000
- assert.strictEqual(result.operations.toScalar.items, void 0, "nothing is stored for the field that could not carry the item");
2001
- });
2002
- (0, import_qunit.test)("an appended item's members are held to the item type's own fields", async function(assert) {
2003
- let { field, contains, containsMany, CardDef } = api;
2004
- let { operation, params } = operations;
2005
- assert.throws(() => {
2006
- class Flawed extends CardDef {
2007
- static displayName = "Flawed";
2008
- static {
2009
- decorateFieldV2(this.prototype, "events", [field], function() {
2010
- return containsMany(fixtures.Comment);
2011
- });
2012
- }
2013
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2014
- static {
2015
- decorateFieldV2(this, "log", [operation], function() {
2016
- return {
2017
- base: "appendContainsMany",
2018
- params: { body: StringField },
2019
- field: "events",
2020
- item: { body: params("note") }
2021
- };
2022
- });
2023
- }
2024
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2025
- }
2026
- return Flawed;
2027
- }, /references the param "note", which the `params` schema does not declare/, "an undeclared param inside an item never reaches lowering");
2028
- class EventLog extends CardDef {
2029
- static displayName = "EventLog";
2030
- static {
2031
- decorateFieldV2(this.prototype, "title", [field], function() {
2032
- return contains(StringField);
2033
- });
2034
- }
2035
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2036
- static {
2037
- decorateFieldV2(this.prototype, "events", [field], function() {
2038
- return containsMany(fixtures.Comment);
2039
- });
2040
- }
2041
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2042
- static {
2043
- decorateFieldV2(this.prototype, "slug", [field], function() {
2044
- return contains(StringField, { computeVia: function() {
2045
- return this.title;
2046
- } });
2047
- });
2048
- }
2049
- #slug = (initializeDeferredDecorator(this, "slug"), void 0);
2050
- static {
2051
- decorateFieldV2(this, "log", [operation], function() {
2052
- return {
2053
- base: "appendContainsMany",
2054
- params: { body: StringField },
2055
- field: "events",
2056
- item: { bdy: params("body") }
2057
- };
2058
- });
2059
- }
2060
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2061
- static {
2062
- decorateFieldV2(this, "logComputed", [operation], function() {
2063
- return {
2064
- base: "appendContainsMany",
2065
- field: "slug",
2066
- item: "x"
2067
- };
2068
- });
2069
- }
2070
- #logComputed = (initializeDeferredDecorator(this, "logComputed"), void 0);
2071
- }
2072
- shim({ EventLog });
2073
- let result = await lower(EventLog);
2074
- assert.deepEqual(codes(result), ["unknown-field", "computed-write"]);
2075
- assert.strictEqual(result.issues[0].path, "item.bdy", "the finding names where in the item the author wrote it");
2076
- assert.true(result.issues[0].message.includes("Comment"), "and the item type the member was checked against");
2077
- assert.deepEqual(result.operations.log.items, { events: { bdy: {
2078
- $ref: "params",
2079
- key: "body"
2080
- } } }, "the item is stored as written, so invoking it reports the finding rather than appending something else");
2081
- });
2082
- (0, import_qunit.test)("a program declared on a base that runs none is recorded", async function(assert) {
2083
- let { field, containsMany, CardDef, FileDef } = api;
2084
- class EventLog extends CardDef {
2085
- static displayName = "EventLog";
2086
- static {
2087
- decorateFieldV2(this.prototype, "events", [field], function() {
2088
- return containsMany(StringField);
2089
- });
2090
- }
2091
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2092
- }
2093
- class LogFile extends FileDef {
2094
- static displayName = "LogFile";
2095
- }
2096
- shim({
2097
- EventLog,
2098
- LogFile
2099
- });
2100
- for (let [def, base, clauses] of [[
2101
- EventLog,
2102
- "appendContainsMany",
2103
- {
2104
- field: "events",
2105
- item: "x"
2106
- }
2107
- ], [
2108
- LogFile,
2109
- "update",
2110
- {}
2111
- ]]) {
2112
- let result = await lowerOperationDeclarations({ doIt: {
2113
- base,
2114
- ...clauses,
2115
- transformations: { $bxl: ".status = \"closed\";" }
2116
- } }, {
2117
- definition: buildDefinition(def),
2118
- lookupDefinition,
2119
- identifyCard: (target) => identifyCard(target)
2120
- });
2121
- assert.deepEqual(codes(result), ["unrunnable-program"], `a "${base}" writes to the stored file rather than running a program`);
2122
- assert.strictEqual(result.operations.doIt.program, void 0, "and nothing is stored that could later be mistaken for one that runs");
2123
- }
2124
- });
2125
- (0, import_qunit.test)("a link strategy is carried onto a read or a query and recorded on anything else", async function(assert) {
2126
- let { field, contains, CardDef } = api;
2127
- class Roster extends CardDef {
2128
- static displayName = "Roster";
2129
- static {
2130
- decorateFieldV2(this.prototype, "title", [field], function() {
2131
- return contains(StringField);
2132
- });
2133
- }
2134
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2135
- }
2136
- shim({ Roster });
2137
- let read = await lowerOperationDeclarations({ summary: {
2138
- base: "read",
2139
- links: "ids"
2140
- } }, {
2141
- definition: buildDefinition(Roster),
2142
- lookupDefinition,
2143
- identifyCard: (target) => identifyCard(target)
2144
- });
2145
- assert.deepEqual(codes(read), [], "a read may declare one");
2146
- assert.strictEqual(read.operations.summary.links, "ids", "and the realm executes it from the stored entry");
2147
- let write = await lowerOperationDeclarations({ rename: {
2148
- base: "transform",
2149
- set: { title: "Renamed" },
2150
- links: "none"
2151
- } }, {
2152
- definition: buildDefinition(Roster),
2153
- lookupDefinition,
2154
- identifyCard: (target) => identifyCard(target)
2155
- });
2156
- assert.deepEqual(codes(write), ["links-without-assembly"], "a base that assembles no link closure has nothing to narrow");
2157
- assert.strictEqual(write.operations.rename.links, void 0, "and nothing is stored that a serving path would read as a narrowing");
2158
- let query = await lowerOperationDeclarations({ roll: {
2159
- base: "query",
2160
- query: { filter: {
2161
- on: Roster,
2162
- eq: { title: "x" }
2163
- } },
2164
- links: "ids"
2165
- } }, {
2166
- definition: buildDefinition(Roster),
2167
- lookupDefinition,
2168
- identifyCard: (target) => identifyCard(target)
2169
- });
2170
- assert.deepEqual(codes(query), [], "a query may declare one");
2171
- assert.strictEqual(query.operations.roll.links, "ids", "and the realm serves its results from the stored entry");
2172
- let unknown = await lowerOperationDeclarations({ summary: {
2173
- base: "read",
2174
- links: "some"
2175
- } }, {
2176
- definition: buildDefinition(Roster),
2177
- lookupDefinition,
2178
- identifyCard: (target) => identifyCard(target)
2179
- });
2180
- assert.deepEqual(codes(unknown), ["invalid-link-strategy"], "a value that names no strategy is its own finding");
2181
- assert.strictEqual(unknown.operations.summary.links, void 0, "and is not stored for the serving path to read as the narrowest one");
2182
- });
2183
- (0, import_qunit.test)("`none` is a query strategy, and a read declaring it is recorded", async function(assert) {
2184
- let { field, contains, CardDef } = api;
2185
- class Roster extends CardDef {
2186
- static displayName = "Roster";
2187
- static {
2188
- decorateFieldV2(this.prototype, "title", [field], function() {
2189
- return contains(StringField);
2190
- });
2191
- }
2192
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2193
- }
2194
- shim({ Roster });
2195
- let lower = (declarations) => lowerOperationDeclarations(declarations, {
2196
- definition: buildDefinition(Roster),
2197
- lookupDefinition,
2198
- identifyCard: (target) => identifyCard(target)
2199
- });
2200
- for (let name of ["read", "summary"]) {
2201
- let none = await lower({ [name]: {
2202
- base: "read",
2203
- links: "none"
2204
- } });
2205
- assert.deepEqual(codes(none), ["invalid-link-strategy"], `a read named "${name}" may not withhold its links`);
2206
- assert.true(none.operations[name].invalid, `and "${name}" is refused rather than served without them`);
2207
- assert.strictEqual(none.operations[name].links, void 0, `and no narrowing is stored for "${name}"`);
2208
- }
2209
- for (let links of ["full", "ids"]) {
2210
- let narrowed = await lower({ read: {
2211
- base: "read",
2212
- links
2213
- } });
2214
- assert.deepEqual(codes(narrowed), [], `a read may declare "${links}"`);
2215
- assert.strictEqual(narrowed.operations.read.links, links, `and "${links}" is stored for the realm to serve`);
2216
- }
2217
- let query = await lower({ roll: {
2218
- base: "query",
2219
- query: { filter: {
2220
- on: Roster,
2221
- eq: { title: "x" }
2222
- } },
2223
- links: "none"
2224
- } });
2225
- assert.deepEqual(codes(query), [], "a query may declare \"none\"");
2226
- assert.strictEqual(query.operations.roll.links, "none", "and its rows are served under it");
2227
- });
2228
- (0, import_qunit.test)("an html declaration is carried onto a read or a query and recorded on anything else", async function(assert) {
2229
- let { field, contains, CardDef } = api;
2230
- class Roster extends CardDef {
2231
- static displayName = "Roster";
2232
- static {
2233
- decorateFieldV2(this.prototype, "title", [field], function() {
2234
- return contains(StringField);
2235
- });
2236
- }
2237
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2238
- }
2239
- shim({ Roster });
2240
- let lower = (declarations) => lowerOperationDeclarations(declarations, {
2241
- definition: buildDefinition(Roster),
2242
- lookupDefinition,
2243
- identifyCard: (target) => identifyCard(target)
2244
- });
2245
- let read = await lower({ summary: {
2246
- base: "read",
2247
- html: {
2248
- embedded: "unshareable",
2249
- fitted: "shareable"
2250
- }
2251
- } });
2252
- assert.deepEqual(codes(read), [], "a read may declare one");
2253
- assert.deepEqual(read.operations.summary.html, {
2254
- embedded: "unshareable",
2255
- fitted: "shareable"
2256
- }, "and the realm serves reads of the card from the stored entry");
2257
- let query = await lower({ roll: {
2258
- base: "query",
2259
- query: { filter: {
2260
- on: Roster,
2261
- eq: { title: "x" }
2262
- } },
2263
- html: { isolated: "unshareable" }
2264
- } });
2265
- assert.deepEqual(codes(query), [], "a query may declare one");
2266
- assert.deepEqual(query.operations.roll.html, { isolated: "unshareable" }, "and the realm serves its rows from the stored entry");
2267
- let write = await lower({ rename: {
2268
- base: "transform",
2269
- set: { title: "Renamed" },
2270
- html: { embedded: "unshareable" }
2271
- } });
2272
- assert.deepEqual(codes(write), ["html-without-rendering"], "a base that serves no prerendered HTML has nothing to withhold");
2273
- assert.strictEqual(write.operations.rename.html, void 0, "and nothing is stored that a serving path would read as a withholding");
2274
- for (let [label, html] of [
2275
- ["a format the realm does not prerender", { edit: "unshareable" }],
2276
- ["a value that says neither", { embedded: "hidden" }],
2277
- ["something other than a record of formats", ["embedded"]]
2278
- ]) {
2279
- let unknown = await lower({ summary: {
2280
- base: "read",
2281
- html
2282
- } });
2283
- assert.deepEqual(codes(unknown), ["invalid-html-declaration"], `${label} is its own finding`);
2284
- assert.strictEqual(unknown.operations.summary.html, void 0, `${label} is not stored for the serving path to read as withholding every format`);
2285
- }
2286
- });
2287
- (0, import_qunit.test)("an append that says nothing to append is recorded rather than stored as work", async function(assert) {
2288
- let { field, containsMany, CardDef } = api;
2289
- class Ledger extends CardDef {
2290
- static displayName = "Ledger";
2291
- static {
2292
- decorateFieldV2(this.prototype, "entries", [field], function() {
2293
- return containsMany(StringField);
2294
- });
2295
- }
2296
- #entries = (initializeDeferredDecorator(this, "entries"), void 0);
2297
- }
2298
- shim({ Ledger });
2299
- for (let [label, declaration, path] of [
2300
- [
2301
- "no field named",
2302
- { base: "appendContainsMany" },
2303
- "field"
2304
- ],
2305
- [
2306
- "an empty fields map",
2307
- {
2308
- base: "appendContainsMany",
2309
- fields: {}
2310
- },
2311
- "field"
2312
- ],
2313
- [
2314
- "a field with no item",
2315
- {
2316
- base: "appendContainsMany",
2317
- field: "entries"
2318
- },
2319
- "item"
2320
- ],
2321
- [
2322
- "both spellings at once",
2323
- {
2324
- base: "appendContainsMany",
2325
- field: "entries",
2326
- item: "a",
2327
- fields: { entries: "b" }
2328
- },
2329
- "fields"
2330
- ]
2331
- ]) {
2332
- let result = await lowerOperationDeclarations({ log: declaration }, {
2333
- definition: buildDefinition(Ledger),
2334
- lookupDefinition,
2335
- identifyCard: (target) => identifyCard(target)
2336
- });
2337
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["incomplete-append", path]], `${label} is recorded`);
2338
- assert.strictEqual(result.operations.log.items, void 0, `${label} stores nothing to append`);
2339
- assert.true(result.operations.log.invalid, `${label} is flagged`);
2340
- }
2341
- });
2342
- (0, import_qunit.test)("a finding under the fields spelling names the field it was written at", async function(assert) {
2343
- let { field, containsMany, CardDef } = api;
2344
- let { operation } = operations;
2345
- class EventLog extends CardDef {
2346
- static displayName = "EventLog";
2347
- static {
2348
- decorateFieldV2(this.prototype, "events", [field], function() {
2349
- return containsMany(fixtures.Comment);
2350
- });
2351
- }
2352
- #events = (initializeDeferredDecorator(this, "events"), void 0);
2353
- static {
2354
- decorateFieldV2(this.prototype, "labels", [field], function() {
2355
- return containsMany(StringField);
2356
- });
2357
- }
2358
- #labels = (initializeDeferredDecorator(this, "labels"), void 0);
2359
- static {
2360
- decorateFieldV2(this, "log", [operation], function() {
2361
- return {
2362
- base: "appendContainsMany",
2363
- fields: {
2364
- notes: "x",
2365
- events: { bdy: "y" }
2366
- }
2367
- };
2368
- });
2369
- }
2370
- #log = (initializeDeferredDecorator(this, "log"), void 0);
2371
- }
2372
- shim({ EventLog });
2373
- let result = await lower(EventLog);
2374
- assert.deepEqual(result.issues.map((issue) => [issue.code, issue.path]), [["unknown-field", "fields.notes"], ["unknown-field", "fields.events.bdy"]], "the plural spelling carries its own clause path, at the field and inside its item");
2375
- });
2376
- (0, import_qunit.test)("a file def's read keeps the program its output lowers to", async function(assert) {
2377
- let { FileDef } = api;
2378
- let { operation, bxl } = operations;
2379
- class Attachment extends FileDef {
2380
- static displayName = "Attachment";
2381
- static {
2382
- decorateFieldV2(this, "readRedacted", [operation], function() {
2383
- return {
2384
- base: "read",
2385
- output: bxl`{ name: .name }`
2386
- };
2387
- });
2388
- }
2389
- #readRedacted = (initializeDeferredDecorator(this, "readRedacted"), void 0);
2390
- }
2391
- shim({ Attachment });
2392
- let result = await lower(Attachment);
2393
- assert.deepEqual(codes(result), [], "the projection is not refused");
2394
- assert.deepEqual(result.operations.readRedacted.output, {
2395
- source: "{name:.name}",
2396
- syntax: "solidified"
2397
- });
2398
- });
2399
- (0, import_qunit.test)("a realmConfig reference with no setting named cannot stand for a card identity", async function(assert) {
2400
- let { field, contains, linksTo, CardDef } = api;
2401
- let { operation, realmConfig } = operations;
2402
- class Report extends CardDef {
2403
- static displayName = "Report";
2404
- static {
2405
- decorateFieldV2(this.prototype, "title", [field], function() {
2406
- return contains(StringField);
2407
- });
2408
- }
2409
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2410
- static {
2411
- decorateFieldV2(this.prototype, "owner", [field], function() {
2412
- return linksTo(() => fixtures.Author);
2413
- });
2414
- }
2415
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
2416
- static {
2417
- decorateFieldV2(this, "assign", [operation], function() {
2418
- return {
2419
- base: "transform",
2420
- set: { owner: realmConfig() }
2421
- };
2422
- });
2423
- }
2424
- #assign = (initializeDeferredDecorator(this, "assign"), void 0);
2425
- }
2426
- shim({ Report });
2427
- let result = await lower(Report);
2428
- assert.deepEqual(codes(result), ["link-requires-identity"]);
2429
- assert.strictEqual(result.operations.assign.program?.source, ".owner=card(realmConfig());", "the refused form is stored as the executor would read it, so nothing quietly writes something else");
2430
- });
2431
- (0, import_qunit.test)("a reserved name is refused rather than lowered", async function(assert) {
2432
- let { field, contains, CardDef } = api;
2433
- class Reserved extends CardDef {
2434
- static displayName = "Reserved";
2435
- static {
2436
- decorateFieldV2(this.prototype, "title", [field], function() {
2437
- return contains(StringField);
2438
- });
2439
- }
2440
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2441
- }
2442
- shim({ Reserved });
2443
- for (let name of DEFINITION_FREE_BASE_OPERATIONS) {
2444
- let result = await lowerOperationDeclarations({ [name]: { base: "read" } }, {
2445
- definition: buildDefinition(Reserved),
2446
- lookupDefinition,
2447
- identifyCard: (target) => identifyCard(target)
2448
- });
2449
- assert.deepEqual(codes(result), ["reserved-name"], `${name} is recorded as reserved`);
2450
- assert.true(result.operations[name]?.invalid, `${name} is marked invalid rather than dropped, so a consumer reading the entry sees the refusal`);
2451
- }
2452
- });
2453
- (0, import_qunit.test)("a stored saved search under the name `query` is refused rather than lowered", async function(assert) {
2454
- let { field, contains, CardDef } = api;
2455
- class Listed extends CardDef {
2456
- static displayName = "Listed";
2457
- static {
2458
- decorateFieldV2(this.prototype, "title", [field], function() {
2459
- return contains(StringField);
2460
- });
2461
- }
2462
- #title = (initializeDeferredDecorator(this, "title"), void 0);
2463
- }
2464
- shim({ Listed });
2465
- let result = await lowerOperationDeclarations({ query: {
2466
- base: "transform",
2467
- set: { title: "x" }
2468
- } }, {
2469
- definition: buildDefinition(Listed),
2470
- lookupDefinition,
2471
- identifyCard: (target) => identifyCard(target)
2472
- });
2473
- assert.deepEqual(codes(result), ["reserved-name"]);
2474
- assert.true(result.operations.query?.invalid, "stored invalid");
2475
- assert.strictEqual(result.operations.query?.base, "query", "on the base the name means, whatever base the entry named");
2476
- });
2477
- async function lowerRequest(request, extra = {}) {
2478
- let { field, contains, CardDef } = api;
2479
- class Repo extends CardDef {
2480
- static displayName = "Repo";
2481
- static {
2482
- decorateFieldV2(this.prototype, "owner", [field], function() {
2483
- return contains(StringField);
2484
- });
2485
- }
2486
- #owner = (initializeDeferredDecorator(this, "owner"), void 0);
2487
- }
2488
- shim({ Repo });
2489
- return await lowerOperationDeclarations({ fetch: {
2490
- base: "callApi",
2491
- ...request,
2492
- ...extra
2493
- } }, {
2494
- definition: buildDefinition(Repo),
2495
- lookupDefinition,
2496
- identifyCard: (target) => identifyCard(target)
2497
- });
2498
- }
2499
- const ownerParam = {
2500
- $ref: "params",
2501
- key: "owner"
2502
- };
2503
- (0, import_qunit.test)("a keyless request lowers to the request it sends, its values still markers", async function(assert) {
2504
- let result = await lowerRequest({
2505
- url: "https://api.example.com/repos/{owner}/{repo}/issues",
2506
- path: {
2507
- owner: ownerParam,
2508
- repo: {
2509
- $ref: "instance",
2510
- key: "owner"
2511
- }
2512
- },
2513
- query: { state: "open" },
2514
- headers: { accept: "application/json" }
2515
- }, { params: { owner: StringField } });
2516
- assert.deepEqual(codes(result), []);
2517
- assert.deepEqual(result.operations.fetch, {
2518
- base: "callApi",
2519
- params: { owner: {
2520
- kind: "field",
2521
- codeRef: identifyCard(StringField)
2522
- } },
2523
- callApi: {
2524
- method: "GET",
2525
- url: "https://api.example.com/repos/{owner}/{repo}/issues",
2526
- destination: "https://api.example.com/repos/",
2527
- path: {
2528
- owner: ownerParam,
2529
- repo: {
2530
- $ref: "instance",
2531
- key: "owner"
2532
- }
2533
- },
2534
- headers: { accept: "application/json" },
2535
- query: { state: "open" },
2536
- slots: []
2537
- },
2538
- deterministic: true
2539
- });
2540
- });
2541
- (0, import_qunit.test)("the URL lowers to its normalized form and its destination", async function(assert) {
2542
- let result = await lowerRequest({
2543
- url: "https://API.openai.com:443/v1/../chat/{id}",
2544
- path: { id: "7" }
2545
- }, {});
2546
- assert.deepEqual(codes(result), []);
2547
- assert.strictEqual(result.operations.fetch.callApi?.url, "https://api.openai.com/chat/{id}", "the host is lower-cased, the default port dropped and the dot segment resolved, the `{name}` segment kept");
2548
- assert.strictEqual(result.operations.fetch.callApi?.destination, "https://api.openai.com/chat/", "the destination ends at the last `/` before the first `{name}` segment");
2549
- let twoSpellings = await Promise.all(["https://API.example.com:443/v1/../x/", "https://api.example.com/x/"].map((url) => lowerRequest({ url })));
2550
- assert.deepEqual(twoSpellings.map(({ operations }) => [operations.fetch.callApi?.url, operations.fetch.callApi?.destination]), [["https://api.example.com/x/", "https://api.example.com/x/"], ["https://api.example.com/x/", "https://api.example.com/x/"]], "two spellings of one place lower alike");
2551
- });
2552
- (0, import_qunit.test)("a URL with no `{name}` segment has the destination its path has up to the last `/`", async function(assert) {
2553
- for (let [url, destination] of [
2554
- ["https://api.example.com/v1/chat/completions", "https://api.example.com/v1/chat/"],
2555
- ["https://api.example.com/v1/models/", "https://api.example.com/v1/models/"],
2556
- ["https://api.example.com", "https://api.example.com/"],
2557
- ["https://api.example.com/items?page=2#top", "https://api.example.com/"],
2558
- ["https://api.example.com//evil.net/x", "https://api.example.com//evil.net/"],
2559
- ["http://localhost:4519/echo", "http://localhost:4519/"]
2560
- ]) {
2561
- let result = await lowerRequest({ url });
2562
- assert.deepEqual(codes(result), [], url);
2563
- assert.strictEqual(result.operations.fetch.callApi?.destination, destination, url);
2564
- }
2565
- let laterParameter = await lowerRequest({
2566
- url: "https://api.example.com/repos/{owner}/issues/{n}",
2567
- path: {
2568
- owner: "o",
2569
- n: "1"
2570
- }
2571
- });
2572
- assert.strictEqual(laterParameter.operations.fetch.callApi?.destination, "https://api.example.com/repos/", "the first `{name}` segment ends it, whatever follows");
2573
- });
2574
- (0, import_qunit.test)("a wildcard host is refused", async function(assert) {
2575
- for (let url of [
2576
- "https://*.example.com/items",
2577
- "https://%2A.example.com/items",
2578
- "https://api.*/items"
2579
- ]) {
2580
- let result = await lowerRequest({ url });
2581
- assert.deepEqual(codes(result), ["invalid-request"], url);
2582
- assert.strictEqual(result.operations.fetch.callApi, void 0, url);
2583
- }
2584
- });
2585
- (0, import_qunit.test)("a URL's own text that reads like lowering's stand-in for a segment stays where it is written", async function(assert) {
2586
- for (let literal of ["boxel-path-parameter-0-", "%62oxel-path-parameter-0-"]) {
2587
- let result = await lowerRequest({
2588
- url: `https://api.example.com/${literal}/{id}`,
2589
- path: { id: "7" }
2590
- });
2591
- assert.deepEqual(codes(result), [], literal);
2592
- assert.strictEqual(result.operations.fetch.callApi?.url, `https://api.example.com/${literal}/{id}`, literal);
2593
- assert.strictEqual(result.operations.fetch.callApi?.destination, `https://api.example.com/${literal}/`, literal);
2594
- }
2595
- });
2596
- (0, import_qunit.test)("a host with a trailing dot is refused", async function(assert) {
2597
- let result = await lowerRequest({
2598
- url: "https://api.example.com./v1/{id}",
2599
- path: { id: "7" }
2600
- });
2601
- assert.deepEqual(codes(result), ["invalid-request"]);
2602
- assert.strictEqual(result.operations.fetch.callApi, void 0);
2603
- });
2604
- (0, import_qunit.test)("an http URL lowers, for the outbound guard to judge when it is sent", async function(assert) {
2605
- let result = await lowerRequest({ url: "http://api.example.com/items" });
2606
- assert.deepEqual(codes(result), []);
2607
- assert.strictEqual(result.operations.fetch.callApi?.destination, "http://api.example.com/");
2608
- });
2609
- (0, import_qunit.test)("a request with a body defaults to POST, and a GraphQL document travels with its variables", async function(assert) {
2610
- let result = await lowerRequest({
2611
- url: "https://api.example.com/graphql",
2612
- graphql: {
2613
- document: "query($owner: String!) { repo(owner: $owner) { id } }",
2614
- variables: { owner: ownerParam }
2615
- }
2616
- }, { params: { owner: StringField } });
2617
- assert.deepEqual(codes(result), []);
2618
- assert.strictEqual(result.operations.fetch.callApi?.method, "POST");
2619
- assert.deepEqual(result.operations.fetch.callApi?.body, {
2620
- kind: "graphql",
2621
- document: "query($owner: String!) { repo(owner: $owner) { id } }",
2622
- variables: { owner: ownerParam }
2623
- });
2624
- });
2625
- (0, import_qunit.test)("each slot is indexed with its key, its name, its transform and where it is sent", async function(assert) {
2626
- let result = await lowerRequest({
2627
- url: "https://api.example.com/hooks/{secret}",
2628
- path: { secret: "{{apiKey:hook}}" },
2629
- headers: { authorization: "Basic {{userKey|basic}}" },
2630
- query: { key: "{{apiKey}}" },
2631
- json: { auth: { token: "tok {{ apiKey : body }}" } }
2632
- });
2633
- assert.deepEqual(codes(result), []);
2634
- assert.deepEqual(result.operations.fetch.callApi?.slots, [
2635
- {
2636
- name: "hook",
2637
- key: "apiKey",
2638
- placement: "path",
2639
- at: "path.secret"
2640
- },
2641
- {
2642
- name: "userKey",
2643
- key: "userKey",
2644
- transform: "basic",
2645
- placement: "header",
2646
- at: "headers.authorization"
2647
- },
2648
- {
2649
- name: "apiKey",
2650
- key: "apiKey",
2651
- placement: "query",
2652
- at: "query.key"
2653
- },
2654
- {
2655
- name: "body",
2656
- key: "apiKey",
2657
- placement: "body",
2658
- at: "json.auth.token"
2659
- }
2660
- ]);
2661
- assert.strictEqual(result.operations.fetch.callApi?.headers?.authorization, "Basic {{userKey|basic}}", "the slot stays where it was written, for the sender to fill");
2662
- });
2663
- (0, import_qunit.test)("a slot placed twice is refused", async function(assert) {
2664
- let result = await lowerRequest({
2665
- url: "https://api.example.com/items",
2666
- headers: { authorization: "Bearer {{apiKey}}" },
2667
- query: { key: "{{apiKey|basic}}" }
2668
- });
2669
- assert.deepEqual(codes(result), ["slot-placed-twice"]);
2670
- assert.true(result.operations.fetch.invalid, "stored invalid");
2671
- assert.strictEqual(result.operations.fetch.callApi, void 0);
2672
- });
2673
- (0, import_qunit.test)("a slot name reused for a different key is refused", async function(assert) {
2674
- let result = await lowerRequest({
2675
- url: "https://api.example.com/items",
2676
- headers: {
2677
- authorization: "Bearer {{apiKey:token}}",
2678
- "x-user": "{{userKey:token}}"
2679
- }
2680
- });
2681
- assert.deepEqual(codes(result), ["slot-name-reused"]);
2682
- });
2683
- (0, import_qunit.test)("a path parameter that is not filled through `path` is refused", async function(assert) {
2684
- let unfilled = await lowerRequest({ url: "https://api.example.com/repos/{owner}" });
2685
- assert.deepEqual(codes(unfilled), ["unencoded-path-parameter"]);
2686
- let partial = await lowerRequest({
2687
- url: "https://api.example.com/v{version}/items",
2688
- path: { version: "2" }
2689
- });
2690
- assert.deepEqual(codes(partial), ["unencoded-path-parameter", "invalid-request"], "part of a segment is not a segment the request fills, so `path` has nothing to fill");
2691
- let inHost = await lowerRequest({
2692
- url: "https://{tenant}.example.com/items",
2693
- path: { tenant: "acme" }
2694
- });
2695
- assert.deepEqual(codes(inHost), ["unencoded-path-parameter", "invalid-request"], "a parameter in the host is refused");
2696
- let spliced = await lowerRequest({ url: `https://api.example.com/repos/${String({})}` });
2697
- assert.deepEqual(codes(spliced), ["unencoded-path-parameter"], "a reference spliced into the URL text is refused");
2698
- let splicedValue = await lowerRequest({
2699
- url: "https://api.example.com/repos/{owner}",
2700
- path: { owner: `team-${String({})}` }
2701
- });
2702
- assert.deepEqual(codes(splicedValue), ["unencoded-path-parameter"]);
2703
- });
2704
- for (let value of [
2705
- "org/name",
2706
- "org\\name",
2707
- "{{apiKey}}/v2",
2708
- "",
2709
- ".",
2710
- "..",
2711
- "a\ud800"
2712
- ]) (0, import_qunit.test)(`a path value written as ${JSON.stringify(value)}, which no request can send, is refused`, async function(assert) {
2713
- let result = await lowerRequest({
2714
- url: "https://api.example.com/models/{model}",
2715
- path: { model: value }
2716
- });
2717
- assert.deepEqual(codes(result), ["invalid-request"]);
2718
- assert.strictEqual(result.issues[0].path, "path.model");
2719
- assert.true(result.issues[0].message.includes("`url`"), "the message points the author to the URL");
2720
- assert.true(result.operations.fetch.invalid, "stored invalid");
2721
- });
2722
- (0, import_qunit.test)("a path value written as text that fills one segment lowers", async function(assert) {
2723
- let result = await lowerRequest({
2724
- url: "https://api.example.com/models/{model}",
2725
- path: { model: "gpt-4.1" }
2726
- });
2727
- assert.deepEqual(codes(result), []);
2728
- assert.deepEqual(result.operations.fetch.callApi?.path, { model: "gpt-4.1" });
2729
- let paired = await lowerRequest({
2730
- url: "https://api.example.com/tags/{tag}",
2731
- path: { tag: "party-🎉" }
2732
- });
2733
- assert.deepEqual(codes(paired), [], "a surrogate pair is valid Unicode");
2734
- });
2735
- (0, import_qunit.test)("a slot outside a header value, a query value, a path value and the body is refused", async function(assert) {
2736
- let inURL = await lowerRequest({ url: "https://api.example.com/items?key={{apiKey}}" });
2737
- assert.deepEqual(codes(inURL), ["slot-out-of-place"]);
2738
- let inHeaderName = await lowerRequest({
2739
- url: "https://api.example.com/items",
2740
- headers: { "{{apiKey}}": "x" }
2741
- });
2742
- assert.true(codes(inHeaderName).includes("slot-out-of-place"));
2743
- let inQueryName = await lowerRequest({
2744
- url: "https://api.example.com/items",
2745
- query: { "{{apiKey}}": "x" }
2746
- });
2747
- assert.deepEqual(codes(inQueryName), ["slot-out-of-place"]);
2748
- let inBodyKey = await lowerRequest({
2749
- url: "https://api.example.com/items",
2750
- json: { auth: { "{{apiKey}}": "x" } }
2751
- });
2752
- assert.deepEqual(codes(inBodyKey), ["slot-out-of-place"], "a member's name is sent as written");
2753
- let inVariableName = await lowerRequest({
2754
- url: "https://api.example.com/graphql",
2755
- graphql: {
2756
- document: "query { viewer { id } }",
2757
- variables: { "{{apiKey}}": "x" }
2758
- }
2759
- });
2760
- assert.deepEqual(codes(inVariableName), ["slot-out-of-place"]);
2761
- let inDocument = await lowerRequest({
2762
- url: "https://api.example.com/graphql",
2763
- graphql: { document: "query { viewer(token: \"{{apiKey}}\") { id } }" }
2764
- });
2765
- assert.deepEqual(codes(inDocument), ["slot-out-of-place"]);
2766
- });
2767
- (0, import_qunit.test)("a GraphQL document built from values is refused", async function(assert) {
2768
- let computed = await lowerRequest({
2769
- url: "https://api.example.com/graphql",
2770
- graphql: { document: ownerParam }
2771
- }, { params: { owner: StringField } });
2772
- assert.deepEqual(codes(computed), ["string-built-graphql"]);
2773
- let spliced = await lowerRequest({
2774
- url: "https://api.example.com/graphql",
2775
- graphql: { document: `query { repo(owner: "${String({})}") { id } }` }
2776
- });
2777
- assert.deepEqual(codes(spliced), ["string-built-graphql"]);
2778
- });
2779
- (0, import_qunit.test)("a malformed slot is refused rather than sent as text", async function(assert) {
2780
- let result = await lowerRequest({
2781
- url: "https://api.example.com/items",
2782
- headers: { authorization: "Bearer {{apiKey|rot13}}" }
2783
- });
2784
- assert.deepEqual(codes(result), ["invalid-slot"]);
2785
- let foreign = await lowerRequest({
2786
- url: "https://api.example.com/items",
2787
- json: { template: "Hello {{name}}" }
2788
- });
2789
- assert.deepEqual(codes(foreign), [], "a vendor's own template text is not a slot");
2790
- });
2791
- (0, import_qunit.test)("a callApi runs no program", async function(assert) {
2792
- let result = await lowerRequest({ url: "https://api.example.com/items" }, { transformations: { $bxl: ".x=1;" } });
2793
- assert.deepEqual(codes(result), ["unrunnable-program"]);
2794
- });
2795
- (0, import_qunit.test)("a callApi is built on a card, not on a file", async function(assert) {
2796
- let { FileDef } = api;
2797
- class Notes extends FileDef {
2798
- static displayName = "Notes";
2799
- }
2800
- shim({ Notes });
2801
- let result = await lowerOperationDeclarations({ fetch: {
2802
- base: "callApi",
2803
- url: "https://api.example.com/items"
2804
- } }, {
2805
- definition: buildDefinition(Notes),
2806
- lookupDefinition,
2807
- identifyCard: (target) => identifyCard(target)
2808
- });
2809
- assert.deepEqual(codes(result), ["base-not-carried"]);
2810
- });
2811
- });
2812
- //#endregion