@cardstack/boxel-cli 0.13.0-unstable.4 → 0.13.0-unstable.6
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.
- package/bundled-realms/pretui/components/doc-report.gts +2 -2
- package/bundled-realms/pretui/components/doc-report.usage.gts +3 -3
- package/bundled-realms/pretui/components/form-field.md +1 -1
- package/bundled-realms/pretui/components/icon-button.md +1 -1
- package/bundled-realms/pretui/components/popup.md +1 -1
- package/bundled-realms/pretui/components/switch.gts +13 -0
- package/bundled-realms/pretui/components/switch.md +5 -3
- package/bundled-realms/pretui/components/theme-frame.gts +49 -22
- package/bundled-realms/pretui/components/tooltip.gts +141 -42
- package/bundled-realms/pretui/components/tooltip.md +10 -12
- package/bundled-realms/pretui/components/tooltip.usage.gts +3 -5
- package/bundled-realms/pretui/docs/structure.md +1 -1
- package/bundled-realms/pretui/internal/overlay.gts +4 -2
- package/bundled-realms/pretui/pretui-css.gts +6 -2
- package/bundled-realms/pretui/theme-scoped-css.gts +262 -0
- package/bundled-test-harness/assets/account-switch-failed-test-DwAZq6Sc.js +45 -0
- package/bundled-test-harness/assets/adapter-C_6pnsx1.js +2 -0
- package/bundled-test-harness/assets/add-field-to-card-definition-tool-test-zMYtJWBv.js +112 -0
- package/bundled-test-harness/assets/ai-assistant-create-workspace-test-CwhAV-Ow.js +130 -0
- package/bundled-test-harness/assets/ai-assistant-panel-relogin-test-DNgclkGJ.js +46 -0
- package/bundled-test-harness/assets/ai-assistant-test-DGYFiRTb.js +2223 -0
- package/bundled-test-harness/assets/ai-function-generation-test-Dj6WzKkh.js +1176 -0
- package/bundled-test-harness/assets/ai-module-creation-test-C4zhhxaZ.js +151 -0
- package/bundled-test-harness/assets/aibot-message-BShcljQ9.js +1312 -0
- package/bundled-test-harness/assets/app-DiEYqT6T.js +14146 -0
- package/bundled-test-harness/assets/apply-markdown-edit-test-CPhfeg1i.js +230 -0
- package/bundled-test-harness/assets/ask-user-picker-NVRkhKwt.js +370 -0
- package/bundled-test-harness/assets/ask-user-picker-test-SsZqFm9W.js +39 -0
- package/bundled-test-harness/assets/assistant-transcript-test-DesuBCIB.js +57 -0
- package/bundled-test-harness/assets/audio-metadata-extractor-test-8JM6oZXG.js +1176 -0
- package/bundled-test-harness/assets/authed-fetch-test-yPTMe-9V.js +73 -0
- package/bundled-test-harness/assets/avif-image-def-test-Kyknj908.js +187 -0
- package/bundled-test-harness/assets/basic-test-D9OrrMaq.js +139 -0
- package/bundled-test-harness/assets/binary-upload-dedupe-test-C0RFmHma.js +308 -0
- package/bundled-test-harness/assets/bot-registration-test-Bk2lTaCW.js +97 -0
- package/bundled-test-harness/assets/box-test-BbV9sMyU.js +50 -0
- package/bundled-test-harness/assets/brand-guide-attachments-test-z4wTsKbI.js +84 -0
- package/bundled-test-harness/assets/brand-guide-custom-css-test-BlSJE8xo.js +196 -0
- package/bundled-test-harness/assets/brand-guide-edit-test-DJ1OQ6IB.js +140 -0
- package/bundled-test-harness/assets/brand-logo-mark-field-test-ux7eetkO.js +86 -0
- package/bundled-test-harness/assets/broken-link-template-test-CqB3MWyw.js +192 -0
- package/bundled-test-harness/assets/bundled-base-modules-test-B2oNLZSJ.js +54 -0
- package/bundled-test-harness/assets/bundled-base-oracle-test-DelPfFjn.js +37 -0
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-Ixsl1tS0.js +236 -0
- package/bundled-test-harness/assets/button-BvYQm_A1.js +141 -0
- package/bundled-test-harness/assets/bxl-cyclic-graph-test-p23WCLRW.js +47 -0
- package/bundled-test-harness/assets/bxl-expression-test-CVTQYT_C.js +250 -0
- package/bundled-test-harness/assets/bxl-indexing-test-D_A7X2sr.js +212 -0
- package/bundled-test-harness/assets/bxl-platform-module-test-Cltfyybp.js +71 -0
- package/bundled-test-harness/assets/can-invoke-test-CVfE1l1V.js +455 -0
- package/bundled-test-harness/assets/can-read-realm-test-CIz6WX_K.js +56 -0
- package/bundled-test-harness/assets/cancel-indexing-job-test-0LlrOgYK.js +69 -0
- package/bundled-test-harness/assets/capture-test-diHIWmh0.js +360 -0
- package/bundled-test-harness/assets/card-api-test-Ci9b0ghP.js +198 -0
- package/bundled-test-harness/assets/card-basics-test-RKQoQWZD.js +5364 -0
- package/bundled-test-harness/assets/card-chooser-paging-test-BN21sDpP.js +235 -0
- package/bundled-test-harness/assets/card-chooser-test-C9jDiIgM.js +393 -0
- package/bundled-test-harness/assets/card-context-search-results-KmkXJbmC.js +30 -0
- package/bundled-test-harness/assets/card-context-search-results-test-CpMr8OlX.js +184 -0
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-D_30xak6.js +562 -0
- package/bundled-test-harness/assets/card-def-menu-items-test-ohuHc0b4.js +228 -0
- package/bundled-test-harness/assets/card-delete-test-BlsD9Xw4.js +466 -0
- package/bundled-test-harness/assets/card-error-3q1o3i0e.js +72 -0
- package/bundled-test-harness/assets/card-error-awaiting-index-test-DPgYKfbF.js +53 -0
- package/bundled-test-harness/assets/card-info-thumbnail-picker-test-CVfeJyjt.js +219 -0
- package/bundled-test-harness/assets/card-playground-test-D-7bi4PQ.js +1491 -0
- package/bundled-test-harness/assets/card-prerender-DemTfK_a.js +12939 -0
- package/bundled-test-harness/assets/card-thunk-error-test-DCBh1vRT.js +48 -0
- package/bundled-test-harness/assets/card-type-service-test-DXPrfVYk.js +161 -0
- package/bundled-test-harness/assets/check-correctness-test-DjE7r1X2.js +1093 -0
- package/bundled-test-harness/assets/check-domain-availability-test-U10xSKbY.js +98 -0
- package/bundled-test-harness/assets/chip-0r_r9SC8.js +44 -0
- package/bundled-test-harness/assets/choreo-CZUXQKjf.js +1110 -0
- package/bundled-test-harness/assets/choreo-D8RcLuoq.js +2 -0
- package/bundled-test-harness/assets/choreo-feature-reel-test-DRGloCAJ.js +155 -0
- package/bundled-test-harness/assets/choreo-gallery-build-order-test-BR-r7gaw.js +436 -0
- package/bundled-test-harness/assets/choreo-gallery-compositor-test-CWRLfcNT.js +399 -0
- package/bundled-test-harness/assets/choreo-gallery-cover-test-BT05gNKC.js +214 -0
- package/bundled-test-harness/assets/choreo-gallery-crossing-stage-test-WJ7FmjYi.js +133 -0
- package/bundled-test-harness/assets/choreo-gallery-demos-alive-test-C-yxdVT_.js +42 -0
- package/bundled-test-harness/assets/choreo-gallery-drift-test-HX1mK3od.js +620 -0
- package/bundled-test-harness/assets/choreo-gallery-escort-test-jZEVk_V4.js +187 -0
- package/bundled-test-harness/assets/choreo-gallery-films-test-DLDQzsxb.js +140 -0
- package/bundled-test-harness/assets/choreo-gallery-filter-test-BJv8KEeP.js +46 -0
- package/bundled-test-harness/assets/choreo-gallery-fold-test-BssKC8A8.js +180 -0
- package/bundled-test-harness/assets/choreo-gallery-guide-pages-test-DS41eNNV.js +114 -0
- package/bundled-test-harness/assets/choreo-gallery-guides-test-DTj7yEKp.js +321 -0
- package/bundled-test-harness/assets/choreo-gallery-hang-test-BqJLmeFF.js +426 -0
- package/bundled-test-harness/assets/choreo-gallery-highlight-test-B1Q7-ICm.js +60 -0
- package/bundled-test-harness/assets/choreo-gallery-inline-edit-test-7My9lVam.js +370 -0
- package/bundled-test-harness/assets/choreo-gallery-interruption-test-BlIAaGrw.js +176 -0
- package/bundled-test-harness/assets/choreo-gallery-lone-stack-test-C9NnYIP8.js +104 -0
- package/bundled-test-harness/assets/choreo-gallery-navigation-test-CWzXkvbW.js +193 -0
- package/bundled-test-harness/assets/choreo-gallery-playhead-transport-test-CwdiZWeI.js +111 -0
- package/bundled-test-harness/assets/choreo-gallery-poplayout-subtree-test-D55fxwTn.js +127 -0
- package/bundled-test-harness/assets/choreo-gallery-presence-modes-test-D8Wxv0lb.js +100 -0
- package/bundled-test-harness/assets/choreo-gallery-presentation-test-BLoWfp6G.js +157 -0
- package/bundled-test-harness/assets/choreo-gallery-reduced-motion-test-D5XxTBDS.js +145 -0
- package/bundled-test-harness/assets/choreo-gallery-sheet-standalone-test-DrHTTvss.js +89 -0
- package/bundled-test-harness/assets/choreo-gallery-sheet-test-BFVdnM_b.js +48 -0
- package/bundled-test-harness/assets/choreo-gallery-site-test-BhEBHdvI.js +237 -0
- package/bundled-test-harness/assets/choreo-gallery-stage-DcKKsdcu.js +256 -0
- package/bundled-test-harness/assets/choreo-gallery-stage-keyboard-test-Fcc6SC3F.js +102 -0
- package/bundled-test-harness/assets/choreo-gallery-stages-test-Cb-ADpxK.js +35 -0
- package/bundled-test-harness/assets/choreo-gallery-subdivision-test-DMJ6C9FW.js +138 -0
- package/bundled-test-harness/assets/choreo-gallery-table-plan-test-CAjSUdLJ.js +144 -0
- package/bundled-test-harness/assets/choreo-gallery-theater-test-B-3IZMj9.js +252 -0
- package/bundled-test-harness/assets/choreo-gallery-tuning-test-BVxK5Ry_.js +95 -0
- package/bundled-test-harness/assets/choreo-gallery-widget-room-test-uWBH1EKE.js +88 -0
- package/bundled-test-harness/assets/choreo-gallery-wires-test-Bo4Sd1Vn.js +148 -0
- package/bundled-test-harness/assets/client-telemetry-test-DFM4mML2.js +340 -0
- package/bundled-test-harness/assets/clip-DY6N6K67.js +92 -0
- package/bundled-test-harness/assets/clip-DzXoPdp-.js +2 -0
- package/bundled-test-harness/assets/code-block-DRE8KQZQ.js +502 -0
- package/bundled-test-harness/assets/code-ref-test-CDcqE8_C.js +163 -0
- package/bundled-test-harness/assets/code-submode-availability-test-DPTqZYYm.js +198 -0
- package/bundled-test-harness/assets/code-submode-test-AHV4mzJ4.js +1839 -0
- package/bundled-test-harness/assets/codeblocks-test-D6ijVvEL.js +418 -0
- package/bundled-test-harness/assets/codemirror-editor-test-BeAMVivu.js +1512 -0
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Bnb7_KUT.js +366 -0
- package/bundled-test-harness/assets/color-field-test-CR6gGEqE.js +212 -0
- package/bundled-test-harness/assets/compaction-test-CjEsY0uG.js +150 -0
- package/bundled-test-harness/assets/computed-test-DtyZGgdc.js +1320 -0
- package/bundled-test-harness/assets/container-BYGZImLU.css +5101 -0
- package/bundled-test-harness/assets/container-CBZZ8uFw.js +10925 -0
- package/bundled-test-harness/assets/content-preview-components-test-BztI4fz-.js +462 -0
- package/bundled-test-harness/assets/copy-and-edit-test-Cqw7kcur.js +292 -0
- package/bundled-test-harness/assets/copy-card-test-D5m3eVEH.js +218 -0
- package/bundled-test-harness/assets/copy-file-to-realm-test-FPY-6Ddm.js +148 -0
- package/bundled-test-harness/assets/copy-source-test-9pJD-qey.js +56 -0
- package/bundled-test-harness/assets/create-file-test-DjMf88u_.js +1086 -0
- package/bundled-test-harness/assets/create-file-test-XbgOqg38.js +464 -0
- package/bundled-test-harness/assets/create-listing-modal-test-De7b4vu3.js +273 -0
- package/bundled-test-harness/assets/create-listing-pr-request-test-CBtIV0Z8.js +117 -0
- package/bundled-test-harness/assets/create-spec-test-4xR0gM7E.js +256 -0
- package/bundled-test-harness/assets/create-submission-workflow-test-DQpWrpGT.js +132 -0
- package/bundled-test-harness/assets/create-workspace-test-BQAudgpS.js +104 -0
- package/bundled-test-harness/assets/credential-fields-test-DXKBdbZD.js +200 -0
- package/bundled-test-harness/assets/csv-file-def-test-Cnp4y834.js +102 -0
- package/bundled-test-harness/assets/dashboard-CmuOhIYC.js +3628 -0
- package/bundled-test-harness/assets/dashboard-CzN49x74.css +2400 -0
- package/bundled-test-harness/assets/dashboard-add-workspace-test-T32hWB-g.js +50 -0
- package/bundled-test-harness/assets/dashboard-agents-test-BN5maCgQ.js +334 -0
- package/bundled-test-harness/assets/dashboard-archive-test-BzwUte_Z.js +128 -0
- package/bundled-test-harness/assets/dashboard-delete-test-D2Gcp81V.js +163 -0
- package/bundled-test-harness/assets/dashboard-duplicate-offer-test-BgKNIr35.js +71 -0
- package/bundled-test-harness/assets/dashboard-duplicate-test-D7JEWylc.js +222 -0
- package/bundled-test-harness/assets/dashboard-get-started-test-DOGPzGoA.js +374 -0
- package/bundled-test-harness/assets/dashboard-ir2bakJS.js +142 -0
- package/bundled-test-harness/assets/dashboard-pinned-cards-test-Bn_P9xJU.js +220 -0
- package/bundled-test-harness/assets/dashboard-publish-test-64sGQ0nG.js +70 -0
- package/bundled-test-harness/assets/dashboard-reindex-test-DJjYq1ct.js +115 -0
- package/bundled-test-harness/assets/dashboard-section-rail-test-ZkAhWu5V.js +169 -0
- package/bundled-test-harness/assets/dashboard-state-test-BbkpPB5L.js +162 -0
- package/bundled-test-harness/assets/dashboard-test-CBLdPrSt.js +545 -0
- package/bundled-test-harness/assets/dashboard-unreachable-notice-test-DFT3R1Zx.js +62 -0
- package/bundled-test-harness/assets/dashboard-workspace-test-DqBdCFo2.js +537 -0
- package/bundled-test-harness/assets/dashboard-workspaces-section-test-CH1HDfxR.js +410 -0
- package/bundled-test-harness/assets/data-file-def-preview-test-CNsZwQEJ.js +155 -0
- package/bundled-test-harness/assets/date-time-fields-test-CEFaZTnF.js +359 -0
- package/bundled-test-harness/assets/debug-message-test-Ck3BfFv3.js +117 -0
- package/bundled-test-harness/assets/declared-captures-test-C-0yPRU7.js +879 -0
- package/bundled-test-harness/assets/delete-workspace-test-CZOwGy78.js +102 -0
- package/bundled-test-harness/assets/diffing-test-BEKI905O.js +210 -0
- package/bundled-test-harness/assets/download-file-to-realm-test-C1kAGDll.js +119 -0
- package/bundled-test-harness/assets/editor-test-C9x5ZY6g.js +688 -0
- package/bundled-test-harness/assets/edits-D76-aanh.js +651 -0
- package/bundled-test-harness/assets/email-field-test-LGkrB_2B.js +75 -0
- package/bundled-test-harness/assets/enum-field-test-CPyV1J-m.js +935 -0
- package/bundled-test-harness/assets/error-display-test-bWuUtfIG.js +343 -0
- package/bundled-test-harness/assets/evaluate-module-test-CbS5h8t3.js +91 -0
- package/bundled-test-harness/assets/execute-atomic-operations-test-B4Kfco0k.js +113 -0
- package/bundled-test-harness/assets/externals-k-2ZBepK.js +4393 -0
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-CuFiH1D8.js +207 -0
- package/bundled-test-harness/assets/fallback-banner-test-CqSRN7D8.js +225 -0
- package/bundled-test-harness/assets/fallback-banner-test-DQkrFE4-.js +53 -0
- package/bundled-test-harness/assets/fallback-models-test-BWekNxC0.js +161 -0
- package/bundled-test-harness/assets/fetch-card-json-test-DULUqUEu.js +61 -0
- package/bundled-test-harness/assets/field-configuration-test-BXZq28xa.js +551 -0
- package/bundled-test-harness/assets/field-markdown-domain-test-DdXCifs6.js +616 -0
- package/bundled-test-harness/assets/field-markdown-oversize-test-DouPPTHX.js +88 -0
- package/bundled-test-harness/assets/field-markdown-primitives-test-DSRGJeyl.js +365 -0
- package/bundled-test-harness/assets/field-markdown-specialized-test-DlTYLl_s.js +534 -0
- package/bundled-test-harness/assets/field-playground-test-NhS4VvoN.js +894 -0
- package/bundled-test-harness/assets/field-support-predicates-test-DWpyT1Qf.js +167 -0
- package/bundled-test-harness/assets/file-attachment-test-LwZf-BSY.js +796 -0
- package/bundled-test-harness/assets/file-chooser-panel-test-DuAqD9bn.js +153 -0
- package/bundled-test-harness/assets/file-chooser-test-CjaXXwpT.js +504 -0
- package/bundled-test-harness/assets/file-def-format-templates-test-BDs4OmHq.js +380 -0
- package/bundled-test-harness/assets/file-def-live-reload-test-BqTdnq-W.js +124 -0
- package/bundled-test-harness/assets/file-def-menu-items-test-DqdINXsD.js +138 -0
- package/bundled-test-harness/assets/file-def-navigation-test-BPGr0SQy.js +109 -0
- package/bundled-test-harness/assets/file-def-serialization-test-CvjW-FlC.js +89 -0
- package/bundled-test-harness/assets/file-def-test-C-Yv_NjS.js +216 -0
- package/bundled-test-harness/assets/file-preview-live-reload-test-MzwGwasU.js +310 -0
- package/bundled-test-harness/assets/file-resource-primitives-test-D3GmfqNs.js +255 -0
- package/bundled-test-harness/assets/file-tree-from-index-test-CfldnUgm.js +96 -0
- package/bundled-test-harness/assets/file-tree-test--0ZCPRe9.js +851 -0
- package/bundled-test-harness/assets/file-view-model-test-BDIAeBV8.js +346 -0
- package/bundled-test-harness/assets/filedef-export-shape-test-B2tgU404.js +61 -0
- package/bundled-test-harness/assets/film-Bf73ypzi.js +4074 -0
- package/bundled-test-harness/assets/film-C54lhaiU.js +2 -0
- package/bundled-test-harness/assets/film-DPcMEHYu.js +13 -0
- package/bundled-test-harness/assets/flac-audio-def-test-ByoXMoQ1.js +143 -0
- package/bundled-test-harness/assets/font-metadata-extractor-test-hawLTDTG.js +415 -0
- package/bundled-test-harness/assets/formatted-aibot-message-test-BahBj3x8.js +109 -0
- package/bundled-test-harness/assets/formatted-user-message-test-CodbrU3t.js +43 -0
- package/bundled-test-harness/assets/freestyle-test-faQhSciz.js +17 -0
- package/bundled-test-harness/assets/full-reindex-realm-test-CE5RJTIC.js +101 -0
- package/bundled-test-harness/assets/garbage-collection-test-v-3sev77.js +403 -0
- package/bundled-test-harness/assets/general-test-DKZPBtSb.js +923 -0
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-CucWyrkH.js +65 -0
- package/bundled-test-harness/assets/generic-file-def-preview-test-_EDRsebi.js +71 -0
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-CV023yek.js +47 -0
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test--DOu3DyV.js +47 -0
- package/bundled-test-harness/assets/get-default-writable-realm-test-Bic8jl6R.js +54 -0
- package/bundled-test-harness/assets/get-published-realms-test-DrA5YcFN.js +71 -0
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-jfU6SIWn.js +54 -0
- package/bundled-test-harness/assets/get-relationship-membership-state-test-Ccy2Z7MN.js +1308 -0
- package/bundled-test-harness/assets/get-user-system-card-test-Bmq2lmWv.js +67 -0
- package/bundled-test-harness/assets/gif-image-def-test-N1mMQC-X.js +188 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-BkUDjiTs.js +160 -0
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-DsFWCzTs.js +74 -0
- package/bundled-test-harness/assets/gts-file-def-test-BL1jpQ9J.js +100 -0
- package/bundled-test-harness/assets/head-format-preview-test-BVCaPQqc.js +158 -0
- package/bundled-test-harness/assets/helpers-Ds68JxHe.js +5 -0
- package/bundled-test-harness/assets/host-mode-service-B4bisRdR.js +262 -0
- package/bundled-test-harness/assets/host-mode-test-BmkN2PCJ.js +831 -0
- package/bundled-test-harness/assets/host-submode-test-C6SxQ796.js +1392 -0
- package/bundled-test-harness/assets/html-component-test-CNQ9wF0Q.js +65 -0
- package/bundled-test-harness/assets/html-def-test-BcaCVVQq.js +160 -0
- package/bundled-test-harness/assets/html-meta-extractor-test-BU1hjkTp.js +60 -0
- package/bundled-test-harness/assets/hydratable-card-test-CX6MWiti.js +426 -0
- package/bundled-test-harness/assets/icon-button-C1zH38Nc.js +67 -0
- package/bundled-test-harness/assets/image-metadata-extractor-test-CakSBPZ_.js +1109 -0
- package/bundled-test-harness/assets/index-changes-test-D8RtgfyG.js +367 -0
- package/bundled-test-harness/assets/index-query-engine-test-BETfoYOK.js +2593 -0
- package/bundled-test-harness/assets/index-writer-test-B_bR2fjw.js +3040 -0
- package/bundled-test-harness/assets/inspector-test-BwPXJj1S.js +2058 -0
- package/bundled-test-harness/assets/instance-filter-matcher-test-BSVCg59b.js +788 -0
- package/bundled-test-harness/assets/instantiate-card-test-BVQhZjpq.js +164 -0
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DzQLG41H.js +475 -0
- package/bundled-test-harness/assets/interact-submode-setup-C5bKXq73.js +566 -0
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-Cd3dpjhB.js +99 -0
- package/bundled-test-harness/assets/invite-user-to-room-test-Brabz1tt.js +142 -0
- package/bundled-test-harness/assets/invoke-card-operation-test-C1Q1FUf4.js +333 -0
- package/bundled-test-harness/assets/isolated-render-test-BLJfS7BU.js +51 -0
- package/bundled-test-harness/assets/job-scoped-doc-cache-test-Bgv5woaB.js +181 -0
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-C_bB6KpR.js +103 -0
- package/bundled-test-harness/assets/jpg-image-def-test-gdLIKocD.js +697 -0
- package/bundled-test-harness/assets/json-file-def-test-CPYMRBY-.js +95 -0
- package/bundled-test-harness/assets/key-notices-badge-test-DemslfLw.js +155 -0
- package/bundled-test-harness/assets/key-readiness-test-5tq5JycL.js +190 -0
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-BbhDZ2PH.js +398 -0
- package/bundled-test-harness/assets/linksto-error-sentinel-test-C2t7fFPi.js +238 -0
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test--U_UvUty.js +354 -0
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-Dj3Xy0ZF.js +303 -0
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-D0dK4Jjs.js +197 -0
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test---IYiXok.js +260 -0
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CT04MhES.js +196 -0
- package/bundled-test-harness/assets/lint-and-fix-test-aadgx7rX.js +51 -0
- package/bundled-test-harness/assets/live-test-BGij_vuc.js +100 -0
- package/bundled-test-harness/assets/live-test-CppvValf.js +2 -0
- package/bundled-test-harness/assets/load-default-skills-test-Cp2m_ebp.js +74 -0
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-vU_26Jqu.js +257 -0
- package/bundled-test-harness/assets/loader-test-CTaw8K_B.js +482 -0
- package/bundled-test-harness/assets/loading-test-DGGt4qZZ.js +63 -0
- package/bundled-test-harness/assets/m4a-audio-def-test-DAiReOXH.js +190 -0
- package/bundled-test-harness/assets/main-bXHwJ0CN.js +5 -0
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-CIXq9FqR.js +470 -0
- package/bundled-test-harness/assets/markdown-embed-chooser-test-zFGh9WfP.js +334 -0
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-Byn_WFwY.js +447 -0
- package/bundled-test-harness/assets/markdown-embed-preview-test-Y3iFMttg.js +368 -0
- package/bundled-test-harness/assets/markdown-fallback-test-Br1TPkLZ.js +316 -0
- package/bundled-test-harness/assets/markdown-file-def-test-Crm2MAnq.js +380 -0
- package/bundled-test-harness/assets/markdown-helpers-test-CZ9Vvywc.js +188 -0
- package/bundled-test-harness/assets/markdown-highlighting-test-CFMkoVDl.js +244 -0
- package/bundled-test-harness/assets/markdown-preview-lOh-MyqF.js +72 -0
- package/bundled-test-harness/assets/markdown-preview-test-B8w0fFIy.js +238 -0
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-aH6HQly1.js +146 -0
- package/bundled-test-harness/assets/markdown-skill-search-test-CiNLQs-5.js +80 -0
- package/bundled-test-harness/assets/matrix-service-account-switch-sessions-test-DaA8w1Jj.js +63 -0
- package/bundled-test-harness/assets/matrix-service-boot-assembly-test-21GIlf55.js +300 -0
- package/bundled-test-harness/assets/matrix-service-personal-realm-test-jn9DUENm.js +125 -0
- package/bundled-test-harness/assets/matrix-service-realm-servers-test-eNZVJakl.js +55 -0
- package/bundled-test-harness/assets/matrix-service-realms-list-updated-test-Cabm8_dY.js +132 -0
- package/bundled-test-harness/assets/matrix-service-relogin-test-C77EFgjc.js +59 -0
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-BgM0fPiO.js +35 -0
- package/bundled-test-harness/assets/menu-Cl50TSFe.js +3561 -0
- package/bundled-test-harness/assets/message-service-subscription-test-CfEqH2jP.js +110 -0
- package/bundled-test-harness/assets/message-service-test-DsTzH1In.js +144 -0
- package/bundled-test-harness/assets/message-tool-test-C5xVfTtj.js +33 -0
- package/bundled-test-harness/assets/midi-audio-def-test-goLRCNCZ.js +182 -0
- package/bundled-test-harness/assets/migrate-skill-test-yPCbVfxG.js +161 -0
- package/bundled-test-harness/assets/mini-YXjrY_tH.js +1404 -0
- package/bundled-test-harness/assets/mini-card-chooser-test-DrllikHB.js +272 -0
- package/bundled-test-harness/assets/mini-file-chooser-test-BfqayhmI.js +201 -0
- package/bundled-test-harness/assets/mock-matrix-C7BrPS6S.js +2 -0
- package/bundled-test-harness/assets/mock-matrix-FjsXmU7-.js +15107 -0
- package/bundled-test-harness/assets/modal-BgaZavcs.js +322 -0
- package/bundled-test-harness/assets/model-cost-tier-test-BGg-sJML.js +174 -0
- package/bundled-test-harness/assets/model-file-extract-test-CjEBupY5.js +206 -0
- package/bundled-test-harness/assets/module-transpile-cache-test-XW6DDsmz.js +67 -0
- package/bundled-test-harness/assets/monaco-test-DkoRuFiQ.js +100 -0
- package/bundled-test-harness/assets/mp3-audio-def-test-v369NNsQ.js +133 -0
- package/bundled-test-harness/assets/multiple-stacks-test-CJpYPWdM.js +208 -0
- package/bundled-test-harness/assets/nested-query-field-render-test-CfDrBcUN.js +249 -0
- package/bundled-test-harness/assets/no-stacks-test-MmsJeLpz.js +48 -0
- package/bundled-test-harness/assets/number-field-test-A7B2r0M5.js +184 -0
- package/bundled-test-harness/assets/office-file-def-test-BNRvFmCB.js +263 -0
- package/bundled-test-harness/assets/office-metadata-extractor-test-zlDoEIEp.js +218 -0
- package/bundled-test-harness/assets/office-poster-capture-test-DdFEaOxR.js +203 -0
- package/bundled-test-harness/assets/ogg-audio-def-test-kk91BzQY.js +196 -0
- package/bundled-test-harness/assets/open-create-listing-modal-test-D1Dl1pov.js +131 -0
- package/bundled-test-harness/assets/open-image-in-new-tab-test-DyCmdMyO.js +52 -0
- package/bundled-test-harness/assets/open-secure-window-test-dz1vPudF.js +253 -0
- package/bundled-test-harness/assets/open-workspace-test-BvTcskzP.js +46 -0
- package/bundled-test-harness/assets/operation-lowering-test-omU66bkJ.js +2957 -0
- package/bundled-test-harness/assets/operations-invocation-test-BMj42rQe.js +523 -0
- package/bundled-test-harness/assets/operations-optimistic-test-KJLyzT8v.js +203 -0
- package/bundled-test-harness/assets/operations-query-test-J3HcnaoK.js +459 -0
- package/bundled-test-harness/assets/operations-store-reconciliation-test-CkbGBMBQ.js +406 -0
- package/bundled-test-harness/assets/operations-test-C7zXXpRW.js +2518 -0
- package/bundled-test-harness/assets/operator-mode-acceptance-test-BPolI_RD.js +1195 -0
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-DjTQgizt.js +1036 -0
- package/bundled-test-harness/assets/operator-mode-links-test-DSEqy5Db.js +797 -0
- package/bundled-test-harness/assets/operator-mode-test-CB7BNDNE.js +696 -0
- package/bundled-test-harness/assets/operator-mode-ui-test-C1OhF1il.js +1045 -0
- package/bundled-test-harness/assets/overlay-D2rQi8lJ.js +427 -0
- package/bundled-test-harness/assets/overlay-menu-items-test-CPN31yBJ.js +331 -0
- package/bundled-test-harness/assets/overlays-B-qMEPhY.js +2 -0
- package/bundled-test-harness/assets/overlays-DSf2je0c.js +75 -0
- package/bundled-test-harness/assets/overlays-detached-element-test-C73nMXes.js +56 -0
- package/bundled-test-harness/assets/panel-DjrC7DxA.js +15124 -0
- package/bundled-test-harness/assets/past-sessions-test-BSIS2Hlq.js +321 -0
- package/bundled-test-harness/assets/patch-fields-test-Bp2IE0Jw.js +1014 -0
- package/bundled-test-harness/assets/patch-instance-test-DssuRGKP.js +348 -0
- package/bundled-test-harness/assets/pdf-file-def-test-Barj9ffD.js +111 -0
- package/bundled-test-harness/assets/pdf-metadata-extractor-test-B7KnXcIm.js +130 -0
- package/bundled-test-harness/assets/permission-checking-realm-test-BD4O0nen.js +306 -0
- package/bundled-test-harness/assets/persist-module-inspector-view-test-BIdbkdPr.js +60 -0
- package/bundled-test-harness/assets/persist-scroll-position-test-Bhb7wJiy.js +254 -0
- package/bundled-test-harness/assets/phone-number-field-test-C2yuCrXY.js +73 -0
- package/bundled-test-harness/assets/pill-menu-test-BIp91YXi.js +60 -0
- package/bundled-test-harness/assets/plate-CJq1veVA.js +41 -0
- package/bundled-test-harness/assets/plate-CwAvOUfL.js +2 -0
- package/bundled-test-harness/assets/player-Digk7omr.js +2 -0
- package/bundled-test-harness/assets/player-vsjosoN_.js +82 -0
- package/bundled-test-harness/assets/playground-B02e8uqB.js +58 -0
- package/bundled-test-harness/assets/plural-field-components-test-C1acuN-A.js +198 -0
- package/bundled-test-harness/assets/png-image-def-test-B9QeVo1f.js +266 -0
- package/bundled-test-harness/assets/policy-audit-confirmation-test-CeVquvc_.js +155 -0
- package/bundled-test-harness/assets/policy-scoped-search-test-SFPiIqR3.js +339 -0
- package/bundled-test-harness/assets/prerender-file-extract-test-HSJKAHyO.js +346 -0
- package/bundled-test-harness/assets/prerender-html-test-BTAcFCme.js +670 -0
- package/bundled-test-harness/assets/prerender-meta-test-Csyz2b21.js +614 -0
- package/bundled-test-harness/assets/prerender-module-test-DpTYAbmI.js +409 -0
- package/bundled-test-harness/assets/prerender-persistence-block-test-BhIt-7kK.js +124 -0
- package/bundled-test-harness/assets/prerender-pre-model-error-test-DxKPQKqx.js +61 -0
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-C8V5YWQO.js +134 -0
- package/bundled-test-harness/assets/prerendered-html-read-test-Cq7JVGwg.js +191 -0
- package/bundled-test-harness/assets/pretui-components-test-Ducr9fLT.css +743 -0
- package/bundled-test-harness/assets/pretui-components-test-Hs0uyIUQ.js +992 -0
- package/bundled-test-harness/assets/pretui-primitives-CRs8NRm0.js +69 -0
- package/bundled-test-harness/assets/preview-format-test-cCqLrfdY.js +103 -0
- package/bundled-test-harness/assets/preview-test-BMqJSoR1.js +474 -0
- package/bundled-test-harness/assets/process-card-test-578tfDvr.js +94 -0
- package/bundled-test-harness/assets/profile-settings-modal-CVnNl7Yu.js +990 -0
- package/bundled-test-harness/assets/publish-realm-COoeWexp.js +82 -0
- package/bundled-test-harness/assets/publish-realm-test-a5nkx0Ov.js +210 -0
- package/bundled-test-harness/assets/query-field-barrier-test-qX3xVPfk.js +113 -0
- package/bundled-test-harness/assets/query-field-error-sentinel-test-V6JDPFLX.js +201 -0
- package/bundled-test-harness/assets/query-field-membership-status-test-CK7eDf-K.js +323 -0
- package/bundled-test-harness/assets/query-field-page-optin-test-B5YBHUvU.js +126 -0
- package/bundled-test-harness/assets/query-field-schema-test-D4SjOGlK.js +231 -0
- package/bundled-test-harness/assets/query-field-search-throttle-test-BVkm1-D8.js +154 -0
- package/bundled-test-harness/assets/query-field-stale-prerender-test-9g7hcD91.js +152 -0
- package/bundled-test-harness/assets/query-fields-test-CQYqhzpN.js +535 -0
- package/bundled-test-harness/assets/quick-look-test-CE0o6lJ4.js +139 -0
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D0mJorwH.js +91 -0
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-B_F_2GEB.js +45 -0
- package/bundled-test-harness/assets/read-source-test-BgJV4B4F.js +67 -0
- package/bundled-test-harness/assets/read-text-file-test-DaeLzg4u.js +124 -0
- package/bundled-test-harness/assets/realm-C_a9su1j.js +2858 -0
- package/bundled-test-harness/assets/realm-api-keys-D5USFOoS.js +2 -0
- package/bundled-test-harness/assets/realm-api-keys-m_VOcixC.js +578 -0
- package/bundled-test-harness/assets/realm-api-keys-test-BVs7f5Dz.js +109 -0
- package/bundled-test-harness/assets/realm-api-keys-test-C_uZnTmq.js +588 -0
- package/bundled-test-harness/assets/realm-config-m5eccPW8.js +833 -0
- package/bundled-test-harness/assets/realm-config-policy-standing-test-Ber-IXpc.js +290 -0
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-3Xqt5VlM.js +274 -0
- package/bundled-test-harness/assets/realm-config-settings-test-CkalhbDF.js +187 -0
- package/bundled-test-harness/assets/realm-field-test-B_PUoqnk.js +100 -0
- package/bundled-test-harness/assets/realm-indexing-test-8iLjeV_e.js +4380 -0
- package/bundled-test-harness/assets/realm-policy-fitted-test-Bptvra0U.js +206 -0
- package/bundled-test-harness/assets/realm-policy-test-DwG0qqXE.js +1141 -0
- package/bundled-test-harness/assets/realm-querying-test-Dvw26A6Q.js +1067 -0
- package/bundled-test-harness/assets/realm-server-form-agnostic-test-DrXQH0UP.js +96 -0
- package/bundled-test-harness/assets/realm-server-subscriber-test-Dkj23vQK.js +46 -0
- package/bundled-test-harness/assets/realm-service-info-test-CdRlDhj-.js +67 -0
- package/bundled-test-harness/assets/realm-test-DGYN48Qx.js +2364 -0
- package/bundled-test-harness/assets/realm-token-refresh-test-CEWATL9h.js +153 -0
- package/bundled-test-harness/assets/realm-url-tooltip-test-8ZjTNPuy.js +78 -0
- package/bundled-test-harness/assets/reasoning-test-BV49AYg2.js +221 -0
- package/bundled-test-harness/assets/recent-files-test-Dc6L6Dm4.js +450 -0
- package/bundled-test-harness/assets/reindex-realm-test-CFRSt39u.js +117 -0
- package/bundled-test-harness/assets/relationship-loading-state-test-FKbtOFUr.js +290 -0
- package/bundled-test-harness/assets/remix-card-test-CKGC_Sgq.js +58 -0
- package/bundled-test-harness/assets/rendered-markdown-DXiDN91F.js +292 -0
- package/bundled-test-harness/assets/rendered-markdown-test-n3MlXmmu.js +587 -0
- package/bundled-test-harness/assets/resident-instance-reuse-test-BjdhE6CM.js +82 -0
- package/bundled-test-harness/assets/result-tile-o6dtjgX4.js +144 -0
- package/bundled-test-harness/assets/rich-markdown-field-test-VXr6l20h.js +1647 -0
- package/bundled-test-harness/assets/room-message-test-BrjJ2wMs.js +484 -0
- package/bundled-test-harness/assets/run-P_7TsreC.js +4017 -0
- package/bundled-test-harness/assets/run-realm-code-DsBUf1si.js +2964 -0
- package/bundled-test-harness/assets/run-realm-code-test-cS0DzaKo.js +3844 -0
- package/bundled-test-harness/assets/sanitize-module-list-test-CvuOOiUY.js +85 -0
- package/bundled-test-harness/assets/save-card-skip-index-wait-test-fpJ1eq32.js +89 -0
- package/bundled-test-harness/assets/schema-editor-test-NkKjCgyf.js +785 -0
- package/bundled-test-harness/assets/schema-generation-test-Dmg3lWl7.js +28 -0
- package/bundled-test-harness/assets/scrolling-test-B0GNYGYc.js +412 -0
- package/bundled-test-harness/assets/search-adorn-test-CZebk7_y.js +136 -0
- package/bundled-test-harness/assets/search-and-choose-test-Bd4NZUup.js +154 -0
- package/bundled-test-harness/assets/search-correlation-id-test-DXKlEO55.js +139 -0
- package/bundled-test-harness/assets/search-entries-result-test-QQawA8Fm.js +234 -0
- package/bundled-test-harness/assets/search-entries-test-3DlqGPQq.js +1486 -0
- package/bundled-test-harness/assets/search-entries-tool-test-D1TvDE9D.js +504 -0
- package/bundled-test-harness/assets/search-google-images-test-DqsoQGr1.js +166 -0
- package/bundled-test-harness/assets/search-results-DGrNaPxh.js +266 -0
- package/bundled-test-harness/assets/search-results-test-CqVHYNRt.js +578 -0
- package/bundled-test-harness/assets/search-selection-menu-test-D6bIjKiH.js +108 -0
- package/bundled-test-harness/assets/search-sheet-files-test-Bf37TQXo.js +126 -0
- package/bundled-test-harness/assets/search-sheet-persistence-test-CV4_XdxR.js +131 -0
- package/bundled-test-harness/assets/search-test-Dlb-wg3a.js +2249 -0
- package/bundled-test-harness/assets/search-tool-test-BJLgVMoL.js +156 -0
- package/bundled-test-harness/assets/searchable-option-test-CcbfMqIL.js +322 -0
- package/bundled-test-harness/assets/searchable-search-doc-test-yH9fLGNS.js +1271 -0
- package/bundled-test-harness/assets/section-rail-CNFCebtT.js +113 -0
- package/bundled-test-harness/assets/section-rail-test-KNJAWWl6.js +256 -0
- package/bundled-test-harness/assets/secure-sign-in-Dyljp0Th.js +174 -0
- package/bundled-test-harness/assets/secure-sign-in-test-QnqNuTP3.js +373 -0
- package/bundled-test-harness/assets/segmented-control-DxJdoJ4Z.js +173 -0
- package/bundled-test-harness/assets/select-BiQTg2ts.js +175 -0
- package/bundled-test-harness/assets/send-ai-assistant-message-test-CAn7M2dZ.js +52 -0
- package/bundled-test-harness/assets/send-bot-trigger-event-test-qBu5E_jy.js +56 -0
- package/bundled-test-harness/assets/send-request-via-proxy-test-CLuwLBq_.js +380 -0
- package/bundled-test-harness/assets/sending-test-H0AaBSgi.js +659 -0
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-hMJukiKt.js +136 -0
- package/bundled-test-harness/assets/serialization-test-W5e3wKbz.js +8758 -0
- package/bundled-test-harness/assets/set-user-system-card-test-CjgWLkNV.js +59 -0
- package/bundled-test-harness/assets/setup-CssMNvui.js +772 -0
- package/bundled-test-harness/assets/setup-D8YXvK-p.js +2 -0
- package/bundled-test-harness/assets/shared-link-target-reuse-test-D42UO8DC.js +207 -0
- package/bundled-test-harness/assets/show-card-test-CHEaS514.js +365 -0
- package/bundled-test-harness/assets/signed-capture-link-test-BgEu0F-S.js +132 -0
- package/bundled-test-harness/assets/single-stack-test-DYcu_v7Z.js +652 -0
- package/bundled-test-harness/assets/skills-test-ChmKhADX.js +648 -0
- package/bundled-test-harness/assets/skip-boot-index-guard-test-BzRIncDN.js +46 -0
- package/bundled-test-harness/assets/spec-test-BYvFR6Xb.js +1077 -0
- package/bundled-test-harness/assets/spinner-Bx9x55NA.js +49 -0
- package/bundled-test-harness/assets/src-C1hYFgVl.js +216 -0
- package/bundled-test-harness/assets/src-CIlLx7Lu.js +5 -0
- package/bundled-test-harness/assets/stick-to-bottom-resize-test-DMHsAG0v.js +56 -0
- package/bundled-test-harness/assets/store-add-test-D_9IHQjZ.js +50 -0
- package/bundled-test-harness/assets/store-module-rebuild-test-BRGZoLRV.js +454 -0
- package/bundled-test-harness/assets/store-search-test-3G8JHuj2.js +175 -0
- package/bundled-test-harness/assets/store-test-BiKKDqqW.js +3672 -0
- package/bundled-test-harness/assets/structured-theme-test-11TNsgUW.js +377 -0
- package/bundled-test-harness/assets/summarize-session-test-CwzD_ZbD.js +172 -0
- package/bundled-test-harness/assets/svg-image-def-test-zV6aMK9q.js +167 -0
- package/bundled-test-harness/assets/switch-submode-test-DQU2cP5_.js +168 -0
- package/bundled-test-harness/assets/sync-openrouter-models-test-xrXVaC2H.js +97 -0
- package/bundled-test-harness/assets/test-support-BGl3rthw.js +3 -0
- package/bundled-test-harness/assets/test-support-BcBv__98.js +99 -0
- package/bundled-test-harness/assets/tests-CmM9imwB.js +3598 -0
- package/bundled-test-harness/assets/text-file-def-test-Cyq78UFY.js +94 -0
- package/bundled-test-harness/assets/text-input-validator-test-DBj7TaM_.js +156 -0
- package/bundled-test-harness/assets/text-suggestion-test-C4XAqWqY.js +340 -0
- package/bundled-test-harness/assets/theme-card-test-dVNz4tgU.js +621 -0
- package/bundled-test-harness/assets/theme-dashboard-nav-test-DYSn5pqo.js +196 -0
- package/bundled-test-harness/assets/theme-scheme-island-test-C1WpkfEP.js +264 -0
- package/bundled-test-harness/assets/theme-scoped-css-parity-test-BVluppsE.js +176 -0
- package/bundled-test-harness/assets/titles-DCvAhECF.js +52 -0
- package/bundled-test-harness/assets/titles-ZPeArtS1.js +2 -0
- package/bundled-test-harness/assets/to-device-streaming-test-BJ4J1cXe.js +163 -0
- package/bundled-test-harness/assets/token-usage-test-WUf4r4fQ.js +160 -0
- package/bundled-test-harness/assets/tools-J_Knr_W6.js +774 -0
- package/bundled-test-harness/assets/tools-calling-test-CfqZX0Ed.js +200 -0
- package/bundled-test-harness/assets/tools-test-B4x58ZmI.js +1624 -0
- package/bundled-test-harness/assets/tools-test-Cvau5219.js +3204 -0
- package/bundled-test-harness/assets/tooltip-B0rEgyMW.css +66 -0
- package/bundled-test-harness/assets/tooltip-DvUMUgVX.js +195 -0
- package/bundled-test-harness/assets/transform-cards-test-CYQbZeD9.js +341 -0
- package/bundled-test-harness/assets/ts-file-def-preview-test-m39f8Zio.js +95 -0
- package/bundled-test-harness/assets/ts-file-def-test-xIcL5xWe.js +92 -0
- package/bundled-test-harness/assets/ttf-font-def-test-ClQ2SzFF.js +206 -0
- package/bundled-test-harness/assets/turn-settling-test-DZoL2mRT.js +160 -0
- package/bundled-test-harness/assets/turn-summary-Bmt7ZxTS.js +1039 -0
- package/bundled-test-harness/assets/unpublish-realm-test-0ToTJczx.js +102 -0
- package/bundled-test-harness/assets/update-room-skills-test-o_j8NOUV.js +240 -0
- package/bundled-test-harness/assets/use-ai-assistant-test-D7HFpxKJ.js +384 -0
- package/bundled-test-harness/assets/user-message-BAOt1hS3.js +262 -0
- package/bundled-test-harness/assets/validate-realm-test-e3xIbNLB.js +67 -0
- package/bundled-test-harness/assets/video-metadata-extractor-test-D8naLSlg.js +520 -0
- package/bundled-test-harness/assets/view-visually-test-BuhGau5E.js +335 -0
- package/bundled-test-harness/assets/virtual-network-reset-test-CgaFNGPi.js +96 -0
- package/bundled-test-harness/assets/wav-audio-def-test-CWG_UdCh.js +160 -0
- package/bundled-test-harness/assets/webp-image-def-test-sN4yw8Zu.js +226 -0
- package/bundled-test-harness/assets/workspace-0LfPqbYB.js +445 -0
- package/bundled-test-harness/assets/workspace-a11y-test-DQxYDRAP.js +197 -0
- package/bundled-test-harness/assets/workspace-actions-jGJSfl8M.js +588 -0
- package/bundled-test-harness/assets/workspace-behavior-test-BnF-bmBN.js +338 -0
- package/bundled-test-harness/assets/workspace-delete-multiple-test-D-rxPDuT.js +212 -0
- package/bundled-test-harness/assets/workspace-delete-summary-test-C2-Mve5R.js +63 -0
- package/bundled-test-harness/assets/workspace-hosting-test-BvDKdlOb.js +138 -0
- package/bundled-test-harness/assets/workspace-indexing-test-B34T3kqD.js +71 -0
- package/bundled-test-harness/assets/workspace-test-CJivgv-m.js +51 -0
- package/bundled-test-harness/assets/workspace-test-CuSRpPnQ.js +385 -0
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-aWgjdbCp.js +68 -0
- package/bundled-test-harness/assets/workspace-unit-test-DHMUf2KT.js +122 -0
- package/bundled-test-harness/assets/write-binary-file-test-P-hVQuin.js +124 -0
- package/bundled-test-harness/assets/write-text-file-test-fXvJueDd.js +191 -0
- package/bundled-test-harness/assets/zip-archive-test-C2P5CUSR.js +285 -0
- package/bundled-test-harness/assets/zip-file-def-test-BfJZAmGt.js +164 -0
- package/bundled-test-harness/boxel-ui-checksum.txt +1 -1
- package/bundled-test-harness/index.html +48 -48
- package/bundled-test-harness/tests/index.html +50 -50
- package/bundled-types/boxel-ui/helpers/theme-scoped-css.ts +4 -0
- package/bundled-types/choreo/choreo.gts +58 -2
- package/bundled-types/choreo/compile.ts +5 -0
- package/bundled-types/choreo/layout-probe.ts +100 -0
- package/bundled-types/choreo/run.ts +99 -4
- package/bundled-types/host-app/components/operator-mode/dashboard/get-started.gts +152 -7
- package/bundled-types/host-app/components/operator-mode/dashboard/index.gts +2 -0
- package/bundled-types/host-app/components/operator-mode/dashboard/workspace.gts +5 -3
- package/bundled-types/host-app/components/operator-mode/dashboard-modals/workspace-modals.gts +5 -22
- package/bundled-types/host-app/components/operator-mode/host-submode/publishing-realm-popover.gts +1 -1
- package/bundled-types/host-app/components/operator-mode/host-submode.gts +111 -37
- package/bundled-types/host-app/components/operator-mode/motion/stack-motion.gts +92 -33
- package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +1 -0
- package/bundled-types/host-app/components/operator-mode/stack-item.gts +2 -2
- package/bundled-types/host-app/components/operator-mode/stack.gts +36 -25
- package/bundled-types/host-app/components/operator-mode/submode-layout.gts +2 -2
- package/bundled-types/host-app/lib/modal-focus-trap.ts +33 -0
- package/bundled-types/host-app/lib/workspace-actions.ts +21 -0
- package/bundled-types/host-app/services/host-mode-service.ts +39 -0
- package/bundled-types/host-app/services/realm.ts +14 -0
- package/bundled-types/host-tests/helpers/dashboard.ts +67 -0
- package/package.json +1 -1
- package/bundled-test-harness/assets/account-switch-failed-test-FytUFiPO.js +0 -45
- package/bundled-test-harness/assets/adapter-DvmPwSZv.js +0 -2
- package/bundled-test-harness/assets/add-field-to-card-definition-tool-test-DN525jiY.js +0 -112
- package/bundled-test-harness/assets/ai-assistant-create-workspace-test-q3tKqVJQ.js +0 -130
- package/bundled-test-harness/assets/ai-assistant-panel-relogin-test-DgeXcCyi.js +0 -46
- package/bundled-test-harness/assets/ai-assistant-test-lDIGPKFP.js +0 -2223
- package/bundled-test-harness/assets/ai-function-generation-test-D5GbLyvL.js +0 -1176
- package/bundled-test-harness/assets/ai-module-creation-test-I3-j2beD.js +0 -151
- package/bundled-test-harness/assets/aibot-message-Dmsjifs6.js +0 -1312
- package/bundled-test-harness/assets/app-BS9_-DhN.js +0 -14146
- package/bundled-test-harness/assets/apply-markdown-edit-test-4zlwt0Db.js +0 -230
- package/bundled-test-harness/assets/ask-user-picker-Dr-0qpNr.js +0 -370
- package/bundled-test-harness/assets/ask-user-picker-test-633AFdmS.js +0 -39
- package/bundled-test-harness/assets/assistant-transcript-test-BgRnLvMg.js +0 -57
- package/bundled-test-harness/assets/audio-metadata-extractor-test-4xsQqL-0.js +0 -1176
- package/bundled-test-harness/assets/authed-fetch-test-663mT5_N.js +0 -73
- package/bundled-test-harness/assets/avif-image-def-test-h01BPIJy.js +0 -187
- package/bundled-test-harness/assets/basic-test-DiD6T-8Q.js +0 -139
- package/bundled-test-harness/assets/binary-upload-dedupe-test-CkjMPO_e.js +0 -308
- package/bundled-test-harness/assets/bot-registration-test-CFZHpwdj.js +0 -97
- package/bundled-test-harness/assets/box-test-C3pSy5ED.js +0 -50
- package/bundled-test-harness/assets/brand-guide-attachments-test-EoC_u7Vc.js +0 -84
- package/bundled-test-harness/assets/brand-guide-custom-css-test-Dn3fvblr.js +0 -196
- package/bundled-test-harness/assets/brand-guide-edit-test-NeiT3MyK.js +0 -140
- package/bundled-test-harness/assets/brand-logo-mark-field-test-C2A1EnBB.js +0 -86
- package/bundled-test-harness/assets/broken-link-template-test-CWn6V5zZ.js +0 -192
- package/bundled-test-harness/assets/bundled-base-modules-test-D7mLzpsw.js +0 -54
- package/bundled-test-harness/assets/bundled-base-oracle-test-I7xCId_k.js +0 -37
- package/bundled-test-harness/assets/buried-stack-item-scroll-test-DFBev0h-.js +0 -236
- package/bundled-test-harness/assets/button-BeSuhveJ.js +0 -207
- package/bundled-test-harness/assets/bxl-cyclic-graph-test-DPykwvvx.js +0 -47
- package/bundled-test-harness/assets/bxl-expression-test-LBWJiFb9.js +0 -250
- package/bundled-test-harness/assets/bxl-indexing-test-BuZmLk7y.js +0 -212
- package/bundled-test-harness/assets/bxl-platform-module-test-BNIvlkCM.js +0 -71
- package/bundled-test-harness/assets/can-invoke-test-t-bFIIeX.js +0 -455
- package/bundled-test-harness/assets/can-read-realm-test-2Q_MzRT9.js +0 -56
- package/bundled-test-harness/assets/cancel-indexing-job-test-QeYxEukn.js +0 -69
- package/bundled-test-harness/assets/capture-test-CJmJG8YR.js +0 -360
- package/bundled-test-harness/assets/card-api-test-B43I510H.js +0 -198
- package/bundled-test-harness/assets/card-basics-test-CBClzP2y.js +0 -5364
- package/bundled-test-harness/assets/card-chooser-paging-test-HEVzf6pR.js +0 -235
- package/bundled-test-harness/assets/card-chooser-test-GfjBRPFI.js +0 -393
- package/bundled-test-harness/assets/card-context-search-results-CoSr4EdS.js +0 -30
- package/bundled-test-harness/assets/card-context-search-results-test-BLMlZu9t.js +0 -184
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-DEBOzKan.js +0 -562
- package/bundled-test-harness/assets/card-def-menu-items-test-88_h8o0D.js +0 -228
- package/bundled-test-harness/assets/card-delete-test-DKom1phy.js +0 -466
- package/bundled-test-harness/assets/card-error-awaiting-index-test-DEwgFZMP.js +0 -53
- package/bundled-test-harness/assets/card-error-r6_cXst9.js +0 -72
- package/bundled-test-harness/assets/card-info-thumbnail-picker-test-B7LiY15e.js +0 -219
- package/bundled-test-harness/assets/card-playground-test-CgyIJHui.js +0 -1491
- package/bundled-test-harness/assets/card-prerender-rPfzpIOU.js +0 -12939
- package/bundled-test-harness/assets/card-thunk-error-test-L0pvg4Ce.js +0 -48
- package/bundled-test-harness/assets/card-type-service-test-B2dhqxSD.js +0 -161
- package/bundled-test-harness/assets/check-correctness-test-DgqaLlCW.js +0 -1093
- package/bundled-test-harness/assets/check-domain-availability-test-B0hJHY5l.js +0 -98
- package/bundled-test-harness/assets/chip-D01NW3WH.js +0 -44
- package/bundled-test-harness/assets/choreo-D2Jl79RU.js +0 -1019
- package/bundled-test-harness/assets/choreo-_E8SOEe-.js +0 -2
- package/bundled-test-harness/assets/choreo-feature-reel-test-WLjsZDmS.js +0 -155
- package/bundled-test-harness/assets/choreo-gallery-build-order-test-6jnS8PsS.js +0 -436
- package/bundled-test-harness/assets/choreo-gallery-compositor-test-CbUZsVB6.js +0 -399
- package/bundled-test-harness/assets/choreo-gallery-cover-test-CbvAStgk.js +0 -214
- package/bundled-test-harness/assets/choreo-gallery-crossing-stage-test-tdjvUSa6.js +0 -133
- package/bundled-test-harness/assets/choreo-gallery-demos-alive-test-CsnM3hQK.js +0 -42
- package/bundled-test-harness/assets/choreo-gallery-drift-test-DG2LQTa7.js +0 -620
- package/bundled-test-harness/assets/choreo-gallery-escort-test-mn3-qXP1.js +0 -187
- package/bundled-test-harness/assets/choreo-gallery-films-test-BuktaC0D.js +0 -140
- package/bundled-test-harness/assets/choreo-gallery-filter-test-Dd-zpps0.js +0 -46
- package/bundled-test-harness/assets/choreo-gallery-fold-test-CWc1ijGc.js +0 -180
- package/bundled-test-harness/assets/choreo-gallery-guide-pages-test-tk2QmYPU.js +0 -114
- package/bundled-test-harness/assets/choreo-gallery-guides-test-DVbf1zM4.js +0 -321
- package/bundled-test-harness/assets/choreo-gallery-hang-test-B7EFp2dx.js +0 -426
- package/bundled-test-harness/assets/choreo-gallery-highlight-test-BFgbdesP.js +0 -60
- package/bundled-test-harness/assets/choreo-gallery-inline-edit-test-DJb8FC5R.js +0 -370
- package/bundled-test-harness/assets/choreo-gallery-interruption-test-DWyMXo5D.js +0 -176
- package/bundled-test-harness/assets/choreo-gallery-lone-stack-test-D3b8LsJ6.js +0 -104
- package/bundled-test-harness/assets/choreo-gallery-navigation-test-CjjU6Rvn.js +0 -193
- package/bundled-test-harness/assets/choreo-gallery-playhead-transport-test-Le_h3QWU.js +0 -111
- package/bundled-test-harness/assets/choreo-gallery-poplayout-subtree-test-Cp-DlWj4.js +0 -127
- package/bundled-test-harness/assets/choreo-gallery-presence-modes-test-DayS4GCJ.js +0 -100
- package/bundled-test-harness/assets/choreo-gallery-presentation-test-DeAfuFS7.js +0 -157
- package/bundled-test-harness/assets/choreo-gallery-reduced-motion-test-BgPWpggq.js +0 -145
- package/bundled-test-harness/assets/choreo-gallery-sheet-standalone-test-PzyoMNYv.js +0 -89
- package/bundled-test-harness/assets/choreo-gallery-sheet-test-CxaiNBkL.js +0 -48
- package/bundled-test-harness/assets/choreo-gallery-site-test-6xtSntS5.js +0 -237
- package/bundled-test-harness/assets/choreo-gallery-stage-E6Q5r-zU.js +0 -256
- package/bundled-test-harness/assets/choreo-gallery-stage-keyboard-test-C7aWMr9a.js +0 -102
- package/bundled-test-harness/assets/choreo-gallery-stages-test-CDWWgC61.js +0 -35
- package/bundled-test-harness/assets/choreo-gallery-subdivision-test-Bkp15XJv.js +0 -138
- package/bundled-test-harness/assets/choreo-gallery-table-plan-test-CcGRi_3O.js +0 -144
- package/bundled-test-harness/assets/choreo-gallery-theater-test-Qph5pLT_.js +0 -252
- package/bundled-test-harness/assets/choreo-gallery-tuning-test-C4DhFLVA.js +0 -95
- package/bundled-test-harness/assets/choreo-gallery-widget-room-test-LK493r1M.js +0 -88
- package/bundled-test-harness/assets/choreo-gallery-wires-test-B7SeUCc8.js +0 -148
- package/bundled-test-harness/assets/client-telemetry-test-DGmHzAFx.js +0 -340
- package/bundled-test-harness/assets/clip-BpYQPVz_.js +0 -2
- package/bundled-test-harness/assets/clip-CNaYbIwL.js +0 -92
- package/bundled-test-harness/assets/code-block-Cp2CJo5-.js +0 -502
- package/bundled-test-harness/assets/code-ref-test-C8JBHDb-.js +0 -163
- package/bundled-test-harness/assets/code-submode-availability-test-CzG1Tv6L.js +0 -198
- package/bundled-test-harness/assets/code-submode-test-BclVWjm5.js +0 -1839
- package/bundled-test-harness/assets/codeblocks-test-CmQlyxN7.js +0 -418
- package/bundled-test-harness/assets/codemirror-editor-test-B74H_yn8.js +0 -1512
- package/bundled-test-harness/assets/codemirror-embed-toolbar-test-Bz6VEysU.js +0 -366
- package/bundled-test-harness/assets/color-field-test-DMCPQKIP.js +0 -212
- package/bundled-test-harness/assets/compaction-test-saQCLBrQ.js +0 -150
- package/bundled-test-harness/assets/computed-test-C05HliJC.js +0 -1320
- package/bundled-test-harness/assets/container-Cqcwrd-m.js +0 -10857
- package/bundled-test-harness/assets/container-h3Wc26qn.css +0 -5097
- package/bundled-test-harness/assets/content-preview-components-test-DZPj4_CU.js +0 -462
- package/bundled-test-harness/assets/copy-and-edit-test-DiXTQNTF.js +0 -292
- package/bundled-test-harness/assets/copy-card-test-ys7GquUY.js +0 -218
- package/bundled-test-harness/assets/copy-file-to-realm-test-Gn0Wn4vT.js +0 -148
- package/bundled-test-harness/assets/copy-source-test-BTLrOmPm.js +0 -56
- package/bundled-test-harness/assets/create-file-test-BCeIW-Rt.js +0 -464
- package/bundled-test-harness/assets/create-file-test-DbHQ5JsS.js +0 -1086
- package/bundled-test-harness/assets/create-listing-modal-test-CeHc4ter.js +0 -273
- package/bundled-test-harness/assets/create-listing-pr-request-test-DXbJNfMh.js +0 -117
- package/bundled-test-harness/assets/create-spec-test-BDIZoyHT.js +0 -256
- package/bundled-test-harness/assets/create-submission-workflow-test-Bix5J-3A.js +0 -132
- package/bundled-test-harness/assets/create-workspace-test-BmNnLHwC.js +0 -104
- package/bundled-test-harness/assets/credential-fields-test-NK1F4QWn.js +0 -200
- package/bundled-test-harness/assets/csv-file-def-test-BSfs4TTP.js +0 -102
- package/bundled-test-harness/assets/dashboard-C4T7ffKY.js +0 -3576
- package/bundled-test-harness/assets/dashboard-CFeHuP5-.js +0 -81
- package/bundled-test-harness/assets/dashboard-DQlpW-ux.css +0 -2392
- package/bundled-test-harness/assets/dashboard-add-workspace-test--rr6objf.js +0 -50
- package/bundled-test-harness/assets/dashboard-agents-test-D1y8H4xH.js +0 -334
- package/bundled-test-harness/assets/dashboard-archive-test-bN4EQaXv.js +0 -128
- package/bundled-test-harness/assets/dashboard-delete-test-BvsASb8B.js +0 -163
- package/bundled-test-harness/assets/dashboard-duplicate-offer-test-DEsd5ZzZ.js +0 -71
- package/bundled-test-harness/assets/dashboard-duplicate-test-BnR0sTgB.js +0 -222
- package/bundled-test-harness/assets/dashboard-get-started-test-DG4uUXLv.js +0 -246
- package/bundled-test-harness/assets/dashboard-pinned-cards-test-AoGGVRAS.js +0 -220
- package/bundled-test-harness/assets/dashboard-reindex-test-BN9a96Xp.js +0 -115
- package/bundled-test-harness/assets/dashboard-section-rail-test-B3OT9V2T.js +0 -169
- package/bundled-test-harness/assets/dashboard-state-test-BY0Zqrmj.js +0 -162
- package/bundled-test-harness/assets/dashboard-test-C13oNpWt.js +0 -545
- package/bundled-test-harness/assets/dashboard-unreachable-notice-test-DZIV4x5j.js +0 -62
- package/bundled-test-harness/assets/dashboard-workspace-test-CBnOQViI.js +0 -537
- package/bundled-test-harness/assets/dashboard-workspaces-section-test-KU8ZVOYp.js +0 -396
- package/bundled-test-harness/assets/data-file-def-preview-test-CI5gcdtK.js +0 -155
- package/bundled-test-harness/assets/date-time-fields-test-D2CpR_Pb.js +0 -359
- package/bundled-test-harness/assets/debug-message-test-Df1kHesw.js +0 -117
- package/bundled-test-harness/assets/declared-captures-test-hQ43zuox.js +0 -879
- package/bundled-test-harness/assets/delete-workspace-test-BhfMKsix.js +0 -102
- package/bundled-test-harness/assets/diffing-test-CHRh55mC.js +0 -210
- package/bundled-test-harness/assets/download-file-to-realm-test-CC1HURCi.js +0 -119
- package/bundled-test-harness/assets/editor-test-DkeCv28f.js +0 -688
- package/bundled-test-harness/assets/edits-BSJqtUXM.js +0 -651
- package/bundled-test-harness/assets/email-field-test-DihK0suO.js +0 -75
- package/bundled-test-harness/assets/enum-field-test-Gja3bzt5.js +0 -935
- package/bundled-test-harness/assets/error-display-test-GhYZu7cp.js +0 -343
- package/bundled-test-harness/assets/evaluate-module-test-D_t4CiUq.js +0 -91
- package/bundled-test-harness/assets/execute-atomic-operations-test-xtou8Zeg.js +0 -113
- package/bundled-test-harness/assets/externals-B02-sD_L.js +0 -4393
- package/bundled-test-harness/assets/fallback-banner-live-delete-test-DtxzNXdE.js +0 -207
- package/bundled-test-harness/assets/fallback-banner-test-BfmiQ_68.js +0 -53
- package/bundled-test-harness/assets/fallback-banner-test-DLtTdmvn.js +0 -225
- package/bundled-test-harness/assets/fallback-models-test-BxNJxhfd.js +0 -161
- package/bundled-test-harness/assets/fetch-card-json-test-DofKbzvC.js +0 -61
- package/bundled-test-harness/assets/field-configuration-test-SUoPaXWy.js +0 -551
- package/bundled-test-harness/assets/field-markdown-domain-test-BwtR0dPP.js +0 -616
- package/bundled-test-harness/assets/field-markdown-oversize-test-D8UJcBc3.js +0 -88
- package/bundled-test-harness/assets/field-markdown-primitives-test-D5_ZdoDO.js +0 -365
- package/bundled-test-harness/assets/field-markdown-specialized-test-Dpd5hs04.js +0 -534
- package/bundled-test-harness/assets/field-playground-test-CzhYzKGv.js +0 -894
- package/bundled-test-harness/assets/field-support-predicates-test-BSvVOFth.js +0 -167
- package/bundled-test-harness/assets/file-attachment-test-fM-yFedm.js +0 -796
- package/bundled-test-harness/assets/file-chooser-panel-test-CKj8YTdY.js +0 -153
- package/bundled-test-harness/assets/file-chooser-test-Bs8jFXqa.js +0 -504
- package/bundled-test-harness/assets/file-def-format-templates-test-CxrRoWoD.js +0 -380
- package/bundled-test-harness/assets/file-def-live-reload-test-X_8YEkve.js +0 -124
- package/bundled-test-harness/assets/file-def-menu-items-test-Dx879o_o.js +0 -138
- package/bundled-test-harness/assets/file-def-navigation-test-MMI_EEO1.js +0 -109
- package/bundled-test-harness/assets/file-def-serialization-test-B5lguBQD.js +0 -89
- package/bundled-test-harness/assets/file-def-test-Di9QWcrj.js +0 -216
- package/bundled-test-harness/assets/file-preview-live-reload-test-aqx93A7c.js +0 -310
- package/bundled-test-harness/assets/file-resource-primitives-test-a5abpcSB.js +0 -255
- package/bundled-test-harness/assets/file-tree-from-index-test-CnruGxJ8.js +0 -96
- package/bundled-test-harness/assets/file-tree-test-BCyWDdSE.js +0 -851
- package/bundled-test-harness/assets/file-view-model-test-BfpLa01Y.js +0 -346
- package/bundled-test-harness/assets/filedef-export-shape-test-CQ9XbrzS.js +0 -61
- package/bundled-test-harness/assets/film-CL1zj_bJ.js +0 -2
- package/bundled-test-harness/assets/film-Dq_quZ31.js +0 -13
- package/bundled-test-harness/assets/film-xbkQa060.js +0 -4074
- package/bundled-test-harness/assets/flac-audio-def-test-BmVp9dMx.js +0 -143
- package/bundled-test-harness/assets/focus-Dm4wkM72.js +0 -306
- package/bundled-test-harness/assets/font-metadata-extractor-test-OWEh9_MS.js +0 -415
- package/bundled-test-harness/assets/formatted-aibot-message-test-BpHsWpuV.js +0 -109
- package/bundled-test-harness/assets/formatted-user-message-test-DZW5TAr0.js +0 -43
- package/bundled-test-harness/assets/freestyle-test-D_uaPU_3.js +0 -17
- package/bundled-test-harness/assets/full-reindex-realm-test-C6vHL5kC.js +0 -101
- package/bundled-test-harness/assets/garbage-collection-test-D-Ao4t2n.js +0 -403
- package/bundled-test-harness/assets/general-test-PSGI8W0z.js +0 -923
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-J-m-0E6W.js +0 -65
- package/bundled-test-harness/assets/generic-file-def-preview-test-BAsOhTYU.js +0 -71
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-D5PBOr97.js +0 -47
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-NM9UURHE.js +0 -47
- package/bundled-test-harness/assets/get-default-writable-realm-test-BxXc9a3J.js +0 -54
- package/bundled-test-harness/assets/get-published-realms-test-C8TJEc4-.js +0 -71
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-Dt8CB6lS.js +0 -54
- package/bundled-test-harness/assets/get-relationship-membership-state-test-9_8x3myJ.js +0 -1308
- package/bundled-test-harness/assets/get-user-system-card-test-k0UO-uba.js +0 -67
- package/bundled-test-harness/assets/gif-image-def-test-BWrqPGDX.js +0 -188
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-in-cards-test-BgG8QI9E.js +0 -160
- package/bundled-test-harness/assets/glimmer-motion-and-choreo-test-BKOvNyCN.js +0 -74
- package/bundled-test-harness/assets/gts-file-def-test-BCRHwDeZ.js +0 -100
- package/bundled-test-harness/assets/head-format-preview-test-DnfUhniI.js +0 -158
- package/bundled-test-harness/assets/helpers-DklkegO_.js +0 -5
- package/bundled-test-harness/assets/host-mode-service-vOfN0smp.js +0 -232
- package/bundled-test-harness/assets/host-mode-test-CCCJFz6_.js +0 -831
- package/bundled-test-harness/assets/host-submode-test-CtCfbuPA.js +0 -1342
- package/bundled-test-harness/assets/html-component-test-CWyhb5ZX.js +0 -65
- package/bundled-test-harness/assets/html-def-test-Cb8C2lUx.js +0 -160
- package/bundled-test-harness/assets/html-meta-extractor-test-BHT9Rtir.js +0 -60
- package/bundled-test-harness/assets/hydratable-card-test-DpgpdesD.js +0 -426
- package/bundled-test-harness/assets/icon-button-ABCGVF3C.js +0 -67
- package/bundled-test-harness/assets/image-metadata-extractor-test-ClhPTouq.js +0 -1109
- package/bundled-test-harness/assets/index-changes-test-CgnVr3LH.js +0 -367
- package/bundled-test-harness/assets/index-query-engine-test-CQTwju5_.js +0 -2593
- package/bundled-test-harness/assets/index-writer-test-IoVOoZT2.js +0 -3040
- package/bundled-test-harness/assets/inspector-test-BN2Ieb77.js +0 -2058
- package/bundled-test-harness/assets/instance-filter-matcher-test-Bq-_Sy89.js +0 -788
- package/bundled-test-harness/assets/instantiate-card-test-DEeDTzFV.js +0 -164
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-DP6kOyJS.js +0 -475
- package/bundled-test-harness/assets/interact-submode-setup-B0_cHqH-.js +0 -566
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-9uUD91Pw.js +0 -99
- package/bundled-test-harness/assets/invite-user-to-room-test-CcDA45Ac.js +0 -142
- package/bundled-test-harness/assets/invoke-card-operation-test-DmUtgueM.js +0 -333
- package/bundled-test-harness/assets/isolated-render-test-B2eXNHu6.js +0 -51
- package/bundled-test-harness/assets/job-scoped-doc-cache-test-DF9D7cOc.js +0 -181
- package/bundled-test-harness/assets/job-scoped-instance-residency-test-CSS8xUU5.js +0 -103
- package/bundled-test-harness/assets/jpg-image-def-test-voECMTht.js +0 -697
- package/bundled-test-harness/assets/json-file-def-test-8Y4KLjUC.js +0 -95
- package/bundled-test-harness/assets/key-notices-badge-test-d1mYqx0e.js +0 -155
- package/bundled-test-harness/assets/key-readiness-test-BtCg7PCk.js +0 -190
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CyCMbJnN.js +0 -398
- package/bundled-test-harness/assets/linksto-error-sentinel-test-BDW572-v.js +0 -238
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-B4wM97hD.js +0 -354
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-BhJmtJ0_.js +0 -303
- package/bundled-test-harness/assets/linksto-sentinel-reload-test-BpBQ5V_i.js +0 -197
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-pkBBl4e9.js +0 -260
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-Bb6wjUdD.js +0 -196
- package/bundled-test-harness/assets/lint-and-fix-test-CcMLn-co.js +0 -51
- package/bundled-test-harness/assets/live-test-AyBnq7BX.js +0 -2
- package/bundled-test-harness/assets/live-test-CgnAcIDw.js +0 -100
- package/bundled-test-harness/assets/load-default-skills-test-BIOwtx0Y.js +0 -74
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-D5_oRSER.js +0 -257
- package/bundled-test-harness/assets/loader-test-DSc_jR1c.js +0 -482
- package/bundled-test-harness/assets/loading-test-8pldx7S-.js +0 -63
- package/bundled-test-harness/assets/m4a-audio-def-test-BDI5apzM.js +0 -190
- package/bundled-test-harness/assets/main-5kHyCkdm.js +0 -5
- package/bundled-test-harness/assets/markdown-embed-chooser-modal-test-Wud0s7WZ.js +0 -470
- package/bundled-test-harness/assets/markdown-embed-chooser-test-DVzzS-0C.js +0 -334
- package/bundled-test-harness/assets/markdown-embed-preview-pane-test-B5W_iqsi.js +0 -447
- package/bundled-test-harness/assets/markdown-embed-preview-test-CZF_s0fB.js +0 -368
- package/bundled-test-harness/assets/markdown-fallback-test-fT6BS4W7.js +0 -316
- package/bundled-test-harness/assets/markdown-file-def-test-B1aTzazR.js +0 -380
- package/bundled-test-harness/assets/markdown-helpers-test-gNKZf7Mw.js +0 -188
- package/bundled-test-harness/assets/markdown-highlighting-test-Du5_CQmD.js +0 -244
- package/bundled-test-harness/assets/markdown-preview-h-_aJhRc.js +0 -72
- package/bundled-test-harness/assets/markdown-preview-test-DJvoVsXw.js +0 -238
- package/bundled-test-harness/assets/markdown-skill-frontmatter-test-VwJi3Paj.js +0 -146
- package/bundled-test-harness/assets/markdown-skill-search-test-ysCdf0xM.js +0 -80
- package/bundled-test-harness/assets/matrix-service-account-switch-sessions-test-K2JuMy36.js +0 -63
- package/bundled-test-harness/assets/matrix-service-boot-assembly-test-CkdL_-os.js +0 -300
- package/bundled-test-harness/assets/matrix-service-personal-realm-test-Dy1DultK.js +0 -125
- package/bundled-test-harness/assets/matrix-service-realm-servers-test-DHDDKuEg.js +0 -55
- package/bundled-test-harness/assets/matrix-service-realms-list-updated-test-DcTbZpMl.js +0 -132
- package/bundled-test-harness/assets/matrix-service-relogin-test-D3NQktoa.js +0 -59
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-6CAflWOA.js +0 -35
- package/bundled-test-harness/assets/menu-kUSaJIPq.js +0 -3562
- package/bundled-test-harness/assets/message-service-subscription-test-DaQdgDWi.js +0 -110
- package/bundled-test-harness/assets/message-service-test-BsGEgM_m.js +0 -144
- package/bundled-test-harness/assets/message-tool-test-BB_4kw1V.js +0 -33
- package/bundled-test-harness/assets/midi-audio-def-test-BbbkFjqf.js +0 -182
- package/bundled-test-harness/assets/migrate-skill-test-X9xImDuq.js +0 -161
- package/bundled-test-harness/assets/mini-AwF31elJ.js +0 -1404
- package/bundled-test-harness/assets/mini-card-chooser-test-BZtrEiWu.js +0 -272
- package/bundled-test-harness/assets/mini-file-chooser-test-MIHW3kCI.js +0 -201
- package/bundled-test-harness/assets/mock-matrix-Dd8k0DNa.js +0 -15107
- package/bundled-test-harness/assets/mock-matrix-DhPN_34j.js +0 -2
- package/bundled-test-harness/assets/modal-LTh3_oHK.js +0 -322
- package/bundled-test-harness/assets/model-cost-tier-test-h1IkU9mp.js +0 -174
- package/bundled-test-harness/assets/model-file-extract-test-ntSo0wZF.js +0 -206
- package/bundled-test-harness/assets/module-transpile-cache-test-CDeRaaeP.js +0 -67
- package/bundled-test-harness/assets/monaco-test-C0Fa744D.js +0 -100
- package/bundled-test-harness/assets/mp3-audio-def-test-B4j4qR9H.js +0 -133
- package/bundled-test-harness/assets/multiple-stacks-test-BhA25ywL.js +0 -208
- package/bundled-test-harness/assets/nested-query-field-render-test-S9Y8YNKB.js +0 -249
- package/bundled-test-harness/assets/no-stacks-test-B7VciWyg.js +0 -48
- package/bundled-test-harness/assets/number-field-test-CS74lDPN.js +0 -184
- package/bundled-test-harness/assets/office-file-def-test-2cKc1pmd.js +0 -263
- package/bundled-test-harness/assets/office-metadata-extractor-test-DC8Fo-OW.js +0 -218
- package/bundled-test-harness/assets/office-poster-capture-test-Ba0_5UrT.js +0 -203
- package/bundled-test-harness/assets/ogg-audio-def-test-CIPQ1d4w.js +0 -196
- package/bundled-test-harness/assets/open-create-listing-modal-test-bmQkY5Zl.js +0 -131
- package/bundled-test-harness/assets/open-image-in-new-tab-test-DBD7_vMH.js +0 -52
- package/bundled-test-harness/assets/open-secure-window-test-BgeuYAqz.js +0 -253
- package/bundled-test-harness/assets/open-workspace-test-DRHGljV0.js +0 -46
- package/bundled-test-harness/assets/operation-lowering-test-CH1c0pSH.js +0 -2957
- package/bundled-test-harness/assets/operations-invocation-test-B1YkCLrv.js +0 -523
- package/bundled-test-harness/assets/operations-optimistic-test-DAbtOwsC.js +0 -203
- package/bundled-test-harness/assets/operations-query-test-9p1ZIDe-.js +0 -459
- package/bundled-test-harness/assets/operations-store-reconciliation-test-D0EQh3w2.js +0 -406
- package/bundled-test-harness/assets/operations-test-BQhlrfe3.js +0 -2518
- package/bundled-test-harness/assets/operator-mode-acceptance-test-DtHnonEb.js +0 -1195
- package/bundled-test-harness/assets/operator-mode-card-chooser-test-DQUxZxaq.js +0 -1036
- package/bundled-test-harness/assets/operator-mode-links-test-BJ26HllS.js +0 -797
- package/bundled-test-harness/assets/operator-mode-test-DIPDI0qt.js +0 -696
- package/bundled-test-harness/assets/operator-mode-ui-test-CfA-fAh4.js +0 -1045
- package/bundled-test-harness/assets/overlay-DecPh3nt.js +0 -123
- package/bundled-test-harness/assets/overlay-menu-items-test-C6XqjLtu.js +0 -331
- package/bundled-test-harness/assets/overlays-Ctp8ePzZ.js +0 -75
- package/bundled-test-harness/assets/overlays-CzWpSg5T.js +0 -2
- package/bundled-test-harness/assets/overlays-detached-element-test-DvL_8Bb5.js +0 -56
- package/bundled-test-harness/assets/panel-CImumikB.js +0 -15124
- package/bundled-test-harness/assets/past-sessions-test-N6riGN_I.js +0 -321
- package/bundled-test-harness/assets/patch-fields-test-D30_-KwQ.js +0 -1014
- package/bundled-test-harness/assets/patch-instance-test-C5rGscZq.js +0 -348
- package/bundled-test-harness/assets/pdf-file-def-test-DtiqGRvZ.js +0 -111
- package/bundled-test-harness/assets/pdf-metadata-extractor-test-FU02KmdV.js +0 -130
- package/bundled-test-harness/assets/permission-checking-realm-test-DqdNJDwU.js +0 -306
- package/bundled-test-harness/assets/persist-module-inspector-view-test-BHOAgPVy.js +0 -60
- package/bundled-test-harness/assets/persist-scroll-position-test-qtmS518r.js +0 -254
- package/bundled-test-harness/assets/phone-number-field-test-DhdaM7uL.js +0 -73
- package/bundled-test-harness/assets/pill-menu-test-C9Mrrepl.js +0 -60
- package/bundled-test-harness/assets/plate-9n-sXyCw.js +0 -41
- package/bundled-test-harness/assets/plate-BnZcAk-_.js +0 -2
- package/bundled-test-harness/assets/player-Cu5b4LEJ.js +0 -82
- package/bundled-test-harness/assets/player-unk2mkxV.js +0 -2
- package/bundled-test-harness/assets/playground-BwA8wFGK.js +0 -58
- package/bundled-test-harness/assets/plural-field-components-test-CFNQKETg.js +0 -198
- package/bundled-test-harness/assets/png-image-def-test-DG5Vhlqb.js +0 -266
- package/bundled-test-harness/assets/policy-audit-confirmation-test-yfKU47LR.js +0 -155
- package/bundled-test-harness/assets/policy-scoped-search-test-BjQRDYqR.js +0 -339
- package/bundled-test-harness/assets/prerender-file-extract-test-CEU4SaAZ.js +0 -346
- package/bundled-test-harness/assets/prerender-html-test-CGB3ClCS.js +0 -670
- package/bundled-test-harness/assets/prerender-meta-test-xqc4fW_0.js +0 -614
- package/bundled-test-harness/assets/prerender-module-test-CI1TmZw-.js +0 -409
- package/bundled-test-harness/assets/prerender-persistence-block-test-Da0dJO_N.js +0 -124
- package/bundled-test-harness/assets/prerender-pre-model-error-test-BVLyhk8R.js +0 -61
- package/bundled-test-harness/assets/prerender-serialize-cycle-test-glJFfxHU.js +0 -134
- package/bundled-test-harness/assets/prerendered-html-read-test-Mp4L0VHQ.js +0 -191
- package/bundled-test-harness/assets/pretui-components-test-BBpA9UnA.js +0 -991
- package/bundled-test-harness/assets/pretui-components-test-BqFq7rw_.css +0 -730
- package/bundled-test-harness/assets/preview-format-test-C55Bwcur.js +0 -103
- package/bundled-test-harness/assets/preview-test-CTAhRGU8.js +0 -474
- package/bundled-test-harness/assets/process-card-test-UjqpuxB7.js +0 -94
- package/bundled-test-harness/assets/profile-settings-modal-C8bCgTMK.js +0 -989
- package/bundled-test-harness/assets/publish-realm-ixUB4FPK.js +0 -82
- package/bundled-test-harness/assets/publish-realm-test-CrrsdL4W.js +0 -210
- package/bundled-test-harness/assets/query-field-barrier-test-DjivFE93.js +0 -113
- package/bundled-test-harness/assets/query-field-error-sentinel-test-0HwnV4Mw.js +0 -201
- package/bundled-test-harness/assets/query-field-membership-status-test-C8yTTBkc.js +0 -323
- package/bundled-test-harness/assets/query-field-page-optin-test-D4l_GcII.js +0 -126
- package/bundled-test-harness/assets/query-field-schema-test-DDbcNNm5.js +0 -231
- package/bundled-test-harness/assets/query-field-search-throttle-test-CXp50Ax0.js +0 -154
- package/bundled-test-harness/assets/query-field-stale-prerender-test-DErzt-Cv.js +0 -152
- package/bundled-test-harness/assets/query-fields-test-Dz67fdSl.js +0 -535
- package/bundled-test-harness/assets/quick-look-test-B1ijDsh_.js +0 -139
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-DJxZ16H_.js +0 -91
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-BoRQkZ8c.js +0 -45
- package/bundled-test-harness/assets/read-source-test-Bl-NjchO.js +0 -67
- package/bundled-test-harness/assets/read-text-file-test-CP37CZoo.js +0 -124
- package/bundled-test-harness/assets/realm-CaK5mkT-.js +0 -2852
- package/bundled-test-harness/assets/realm-api-keys-BNUFWbGR.js +0 -579
- package/bundled-test-harness/assets/realm-api-keys-CkshxhXC.js +0 -2
- package/bundled-test-harness/assets/realm-api-keys-test-BP8xifjn.js +0 -109
- package/bundled-test-harness/assets/realm-api-keys-test-CwdK9YXp.js +0 -588
- package/bundled-test-harness/assets/realm-config-iKwE3Htp.js +0 -833
- package/bundled-test-harness/assets/realm-config-policy-standing-test-BgVEIDnB.js +0 -290
- package/bundled-test-harness/assets/realm-config-routing-rule-edit-test-BoJoKzmX.js +0 -274
- package/bundled-test-harness/assets/realm-config-settings-test-Kxw-GHye.js +0 -187
- package/bundled-test-harness/assets/realm-field-test-CdGOxrFb.js +0 -100
- package/bundled-test-harness/assets/realm-indexing-test-CHtsBV2b.js +0 -4380
- package/bundled-test-harness/assets/realm-policy-fitted-test--DhNZSdC.js +0 -206
- package/bundled-test-harness/assets/realm-policy-test-D7714iVa.js +0 -1141
- package/bundled-test-harness/assets/realm-querying-test-Cj1ekZ0H.js +0 -1067
- package/bundled-test-harness/assets/realm-server-form-agnostic-test-CZFPNJfD.js +0 -96
- package/bundled-test-harness/assets/realm-server-subscriber-test-C86WmBp0.js +0 -46
- package/bundled-test-harness/assets/realm-service-info-test-CdgcwKDR.js +0 -67
- package/bundled-test-harness/assets/realm-test-DPoLsvKz.js +0 -2364
- package/bundled-test-harness/assets/realm-token-refresh-test-Ch35Siwi.js +0 -153
- package/bundled-test-harness/assets/realm-url-tooltip-test-x8xWOENK.js +0 -78
- package/bundled-test-harness/assets/reasoning-test-BxpE8Jvf.js +0 -221
- package/bundled-test-harness/assets/recent-files-test-DTmEzPLq.js +0 -450
- package/bundled-test-harness/assets/reindex-realm-test-BQ8KULn4.js +0 -117
- package/bundled-test-harness/assets/relationship-loading-state-test-BJoArPWf.js +0 -290
- package/bundled-test-harness/assets/remix-card-test-DsTA1KoG.js +0 -58
- package/bundled-test-harness/assets/rendered-markdown-DvukulDO.js +0 -292
- package/bundled-test-harness/assets/rendered-markdown-test-DxGptXSV.js +0 -587
- package/bundled-test-harness/assets/resident-instance-reuse-test-ZWnVu8uj.js +0 -82
- package/bundled-test-harness/assets/result-tile-CPyI6Vmv.js +0 -144
- package/bundled-test-harness/assets/rich-markdown-field-test-CdygoXIO.js +0 -1647
- package/bundled-test-harness/assets/room-message-test-D3NfMqH0.js +0 -484
- package/bundled-test-harness/assets/run-D_Px28eF.js +0 -3956
- package/bundled-test-harness/assets/run-realm-code-qWCZxmJ7.js +0 -2964
- package/bundled-test-harness/assets/run-realm-code-test-UzyeEJq6.js +0 -3844
- package/bundled-test-harness/assets/sanitize-module-list-test-Babq44bP.js +0 -85
- package/bundled-test-harness/assets/save-card-skip-index-wait-test-BcELXlQ_.js +0 -89
- package/bundled-test-harness/assets/schema-editor-test-CEvruZbt.js +0 -785
- package/bundled-test-harness/assets/schema-generation-test-hYAMdCrn.js +0 -28
- package/bundled-test-harness/assets/scrolling-test-DVIsh-_1.js +0 -412
- package/bundled-test-harness/assets/search-adorn-test-CkVhqFd0.js +0 -136
- package/bundled-test-harness/assets/search-and-choose-test-DUhOB3FV.js +0 -154
- package/bundled-test-harness/assets/search-correlation-id-test-Drn4r26N.js +0 -139
- package/bundled-test-harness/assets/search-entries-result-test-DTCRJ_wc.js +0 -234
- package/bundled-test-harness/assets/search-entries-test-CE0B47pw.js +0 -1486
- package/bundled-test-harness/assets/search-entries-tool-test-C4aG0ckM.js +0 -504
- package/bundled-test-harness/assets/search-google-images-test-LyhcB2f3.js +0 -166
- package/bundled-test-harness/assets/search-results-D4pSne0x.js +0 -266
- package/bundled-test-harness/assets/search-results-test-CRZHhqhn.js +0 -578
- package/bundled-test-harness/assets/search-selection-menu-test-B7Y3E_nj.js +0 -108
- package/bundled-test-harness/assets/search-sheet-files-test-C2y534g8.js +0 -126
- package/bundled-test-harness/assets/search-sheet-persistence-test-DePC59Bk.js +0 -131
- package/bundled-test-harness/assets/search-test-Dy8NxFkU.js +0 -2249
- package/bundled-test-harness/assets/search-tool-test-lctDaMH3.js +0 -156
- package/bundled-test-harness/assets/searchable-option-test-CE64M8oM.js +0 -322
- package/bundled-test-harness/assets/searchable-search-doc-test-C6u3mVvT.js +0 -1271
- package/bundled-test-harness/assets/section-rail-B_UQX00B.js +0 -113
- package/bundled-test-harness/assets/section-rail-test-DIda7MIw.js +0 -256
- package/bundled-test-harness/assets/secure-sign-in-CqqqfQG8.js +0 -174
- package/bundled-test-harness/assets/secure-sign-in-test-DimbVr_W.js +0 -373
- package/bundled-test-harness/assets/segmented-control-iePxSdTS.js +0 -173
- package/bundled-test-harness/assets/select-tNs6_xwW.js +0 -175
- package/bundled-test-harness/assets/send-ai-assistant-message-test-2GVrMF9Z.js +0 -52
- package/bundled-test-harness/assets/send-bot-trigger-event-test-B_3dKfGN.js +0 -56
- package/bundled-test-harness/assets/send-request-via-proxy-test-_clNWyYc.js +0 -380
- package/bundled-test-harness/assets/sending-test-DCPFXUVg.js +0 -659
- package/bundled-test-harness/assets/serialization-rri-form-audit-test-BI0zCs8Y.js +0 -136
- package/bundled-test-harness/assets/serialization-test-bjdtVlZL.js +0 -8758
- package/bundled-test-harness/assets/set-user-system-card-test-BUv1vL08.js +0 -59
- package/bundled-test-harness/assets/setup-BW1mmC7C.js +0 -772
- package/bundled-test-harness/assets/setup-DsIcFT-T.js +0 -2
- package/bundled-test-harness/assets/shared-link-target-reuse-test-9NeJEjkb.js +0 -207
- package/bundled-test-harness/assets/show-card-test-mfyLwusD.js +0 -365
- package/bundled-test-harness/assets/signed-capture-link-test-BOtKNCAM.js +0 -132
- package/bundled-test-harness/assets/single-stack-test-B4MGjaLk.js +0 -652
- package/bundled-test-harness/assets/skills-test-BuP-Yzk1.js +0 -648
- package/bundled-test-harness/assets/skip-boot-index-guard-test-Cmrx2-K7.js +0 -46
- package/bundled-test-harness/assets/spec-test-BhZDdhVQ.js +0 -1077
- package/bundled-test-harness/assets/spinner-CpIBUG9m.js +0 -49
- package/bundled-test-harness/assets/src-DGHttmW-.js +0 -216
- package/bundled-test-harness/assets/src-DaNDSbp7.js +0 -5
- package/bundled-test-harness/assets/stick-to-bottom-resize-test-Dpy3OVum.js +0 -56
- package/bundled-test-harness/assets/store-add-test-_IYS8o74.js +0 -50
- package/bundled-test-harness/assets/store-module-rebuild-test-B5VMaICy.js +0 -454
- package/bundled-test-harness/assets/store-search-test-C2VZabrH.js +0 -175
- package/bundled-test-harness/assets/store-test-D6PObxoD.js +0 -3672
- package/bundled-test-harness/assets/structured-theme-test-BHjVeMf-.js +0 -377
- package/bundled-test-harness/assets/summarize-session-test-BFtTuhe0.js +0 -172
- package/bundled-test-harness/assets/svg-image-def-test-BL6lkWUX.js +0 -167
- package/bundled-test-harness/assets/switch-submode-test-6Uv3bZMl.js +0 -168
- package/bundled-test-harness/assets/sync-openrouter-models-test-Dp9E05tL.js +0 -97
- package/bundled-test-harness/assets/test-support-DYm8XZ0E.js +0 -3
- package/bundled-test-harness/assets/test-support-DfnhiIMV.js +0 -99
- package/bundled-test-harness/assets/tests-CZk0Iag2.js +0 -3596
- package/bundled-test-harness/assets/text-file-def-test-CHdC0yIU.js +0 -94
- package/bundled-test-harness/assets/text-input-validator-test-B9ZR8XPU.js +0 -156
- package/bundled-test-harness/assets/text-suggestion-test-CGLspKFQ.js +0 -340
- package/bundled-test-harness/assets/theme-card-test-CXZvSEvG.js +0 -621
- package/bundled-test-harness/assets/theme-dashboard-nav-test-CkEE0ILk.js +0 -196
- package/bundled-test-harness/assets/theme-scheme-island-test-URXTjipF.js +0 -264
- package/bundled-test-harness/assets/titles-C6enAdIv.js +0 -2
- package/bundled-test-harness/assets/titles-Dft1HoUT.js +0 -52
- package/bundled-test-harness/assets/to-device-streaming-test-D33ZOc9o.js +0 -163
- package/bundled-test-harness/assets/token-usage-test-BHQlU4J4.js +0 -160
- package/bundled-test-harness/assets/tools-CrudqfS3.js +0 -774
- package/bundled-test-harness/assets/tools-calling-test-jo7IREau.js +0 -200
- package/bundled-test-harness/assets/tools-test-D1wMfUa0.js +0 -1624
- package/bundled-test-harness/assets/tools-test-Dn1LYsXp.js +0 -3204
- package/bundled-test-harness/assets/tooltip-8Wyz4IIn.css +0 -68
- package/bundled-test-harness/assets/tooltip-CqwLzRz5.js +0 -134
- package/bundled-test-harness/assets/transform-cards-test-BPhwPFtp.js +0 -341
- package/bundled-test-harness/assets/ts-file-def-preview-test-Bq3zTgw8.js +0 -95
- package/bundled-test-harness/assets/ts-file-def-test-GLswMl7O.js +0 -92
- package/bundled-test-harness/assets/ttf-font-def-test-DQulvUWs.js +0 -206
- package/bundled-test-harness/assets/turn-settling-test-BspmOUQP.js +0 -160
- package/bundled-test-harness/assets/turn-summary-9A8nvC0-.js +0 -1039
- package/bundled-test-harness/assets/unpublish-realm-test-SkYPEhDz.js +0 -102
- package/bundled-test-harness/assets/update-room-skills-test-cTxb-WU6.js +0 -240
- package/bundled-test-harness/assets/use-ai-assistant-test-uaqW1T_A.js +0 -384
- package/bundled-test-harness/assets/user-message-BudkIP-3.js +0 -262
- package/bundled-test-harness/assets/validate-realm-test-DxrGgH9n.js +0 -67
- package/bundled-test-harness/assets/video-metadata-extractor-test-B2pe-Iqa.js +0 -520
- package/bundled-test-harness/assets/view-visually-test-PNon6fUo.js +0 -335
- package/bundled-test-harness/assets/virtual-network-reset-test-uYJLaQHf.js +0 -96
- package/bundled-test-harness/assets/wav-audio-def-test-F4OrFFR4.js +0 -160
- package/bundled-test-harness/assets/webp-image-def-test-B0a_-Vya.js +0 -226
- package/bundled-test-harness/assets/workspace-Cyftysy9.js +0 -440
- package/bundled-test-harness/assets/workspace-a11y-test-sKiPDcbl.js +0 -197
- package/bundled-test-harness/assets/workspace-actions-BuawjFmZ.js +0 -561
- package/bundled-test-harness/assets/workspace-behavior-test-CKa-pb3T.js +0 -338
- package/bundled-test-harness/assets/workspace-delete-multiple-test-Dt2weG5R.js +0 -212
- package/bundled-test-harness/assets/workspace-delete-summary-test-CkqgFqZ8.js +0 -63
- package/bundled-test-harness/assets/workspace-hosting-test-Ci7EEtHP.js +0 -138
- package/bundled-test-harness/assets/workspace-indexing-test-BPVxxY6W.js +0 -71
- package/bundled-test-harness/assets/workspace-test-CWr7vFbg.js +0 -385
- package/bundled-test-harness/assets/workspace-test-INNpQovc.js +0 -51
- package/bundled-test-harness/assets/workspace-timestamp-labels-test-CigQb5wr.js +0 -68
- package/bundled-test-harness/assets/workspace-unit-test-BwVKpuXT.js +0 -122
- package/bundled-test-harness/assets/write-binary-file-test-BKP3gv1k.js +0 -124
- package/bundled-test-harness/assets/write-text-file-test-B6ijTKTa.js +0 -191
- package/bundled-test-harness/assets/zip-archive-test-C-PBzkTn.js +0 -285
- package/bundled-test-harness/assets/zip-file-def-test-FyCzJT-9.js +0 -164
|
@@ -1,3040 +0,0 @@
|
|
|
1
|
-
import { s as __toESM } from "./chunk-Rp0pCe6z.js";
|
|
2
|
-
import { $ as sweepUnreferencedScopedCSS, Br as testRealmURL, Ca as IndexWriter, Ds as CachingDefinitionLookup, Ia as coerceTypes, Ka as VirtualNetwork, Lr as testRRI, Nc as mergeErrorDetail, Pc as mergeErrorsByGeneration, Ra as persistFileMeta, l as internalKeyFor, va as IndexQueryEngine, wa as jobStagingId } from "./runtime-common-BTaLJEw-.js";
|
|
3
|
-
import { T as rri, w as ri } from "./paths-C9-NYXnM.js";
|
|
4
|
-
import { w as baseCardRef } from "./constants-Icc0nFW-.js";
|
|
5
|
-
import { b as getContext } from "./dist-BOAdzfkP.js";
|
|
6
|
-
import { t as require_qunit } from "./qunit-C-Foo4Nd.js";
|
|
7
|
-
import { r as setupTest } from "./dist-Ds4JDBNZ.js";
|
|
8
|
-
import { T as makeRenderer, at as setupIndex, b as getDbAdapter, h as createPrerenderAuth } from "./mock-matrix-Dd8k0DNa.js";
|
|
9
|
-
import "./code-equality-assertion-Dco7Q4O6.js";
|
|
10
|
-
//#region tests/unit/index-writer-test.ts
|
|
11
|
-
var import_qunit = /* @__PURE__ */ __toESM(require_qunit());
|
|
12
|
-
var testRealmURL2 = ri(`http://test-realm/test2/`);
|
|
13
|
-
var testRealmURLObject = new URL(testRealmURL);
|
|
14
|
-
var internalKeysFor = (vn, ...refs) => refs.map((ref) => internalKeyFor(ref, testRealmURLObject, vn));
|
|
15
|
-
var makeCardResource = (id, name, adoptsFrom) => ({
|
|
16
|
-
id: testRRI(id),
|
|
17
|
-
type: "card",
|
|
18
|
-
attributes: { name },
|
|
19
|
-
meta: { adoptsFrom }
|
|
20
|
-
});
|
|
21
|
-
var makeCardTypeSummary = (codeRef, displayName, iconHTML, total) => ({
|
|
22
|
-
total,
|
|
23
|
-
code_ref: codeRef,
|
|
24
|
-
display_name: displayName,
|
|
25
|
-
icon_html: iconHTML
|
|
26
|
-
});
|
|
27
|
-
var writeInstance = async (batch, opts) => {
|
|
28
|
-
let timestamp = Date.now();
|
|
29
|
-
await batch.updateEntry(new URL(`${testRealmURL}${opts.id}.json`), {
|
|
30
|
-
type: "instance",
|
|
31
|
-
resource: makeCardResource(opts.id, opts.name, opts.adoptsFrom),
|
|
32
|
-
lastModified: timestamp,
|
|
33
|
-
resourceCreatedAt: timestamp,
|
|
34
|
-
searchData: { name: opts.name },
|
|
35
|
-
deps: new Set([`${testRealmURL}${opts.adoptsFrom.name.toLowerCase()}`]),
|
|
36
|
-
displayNames: opts.displayNames,
|
|
37
|
-
types: opts.types,
|
|
38
|
-
iconHTML: opts.iconHTML
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
var plantRealmMeta = async (adapter, generation, value) => adapter.execute(`INSERT INTO realm_meta (realm_url, generation, value, indexed_at)
|
|
42
|
-
VALUES ($1, $2, $3, $4)`, { bind: [
|
|
43
|
-
testRealmURL,
|
|
44
|
-
generation,
|
|
45
|
-
JSON.stringify(value),
|
|
46
|
-
String(Date.now())
|
|
47
|
-
] });
|
|
48
|
-
var fetchRealmMetaRows = async (adapter) => adapter.execute(`SELECT value FROM realm_meta r WHERE r.realm_url = $1`, {
|
|
49
|
-
bind: [testRealmURL],
|
|
50
|
-
coerceTypes: { value: "JSON" }
|
|
51
|
-
});
|
|
52
|
-
var fetchRealmMeta = async (adapter) => {
|
|
53
|
-
let rows = await fetchRealmMetaRows(adapter);
|
|
54
|
-
let raw = rows[0]?.value;
|
|
55
|
-
return {
|
|
56
|
-
rows,
|
|
57
|
-
value: raw?.instances ?? [],
|
|
58
|
-
files: raw?.files ?? []
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
(0, import_qunit.module)("Unit | index-writer", function(hooks) {
|
|
62
|
-
let adapter;
|
|
63
|
-
let indexWriter;
|
|
64
|
-
let indexQueryEngine;
|
|
65
|
-
let virtualNetwork;
|
|
66
|
-
setupTest(hooks);
|
|
67
|
-
hooks.before(async function() {
|
|
68
|
-
adapter = await getDbAdapter();
|
|
69
|
-
});
|
|
70
|
-
hooks.beforeEach(async function() {
|
|
71
|
-
await adapter.reset();
|
|
72
|
-
indexWriter = new IndexWriter(adapter);
|
|
73
|
-
let owner = getContext().owner;
|
|
74
|
-
await makeRenderer();
|
|
75
|
-
let localIndexer = owner.lookup("service:local-indexer");
|
|
76
|
-
virtualNetwork = new VirtualNetwork();
|
|
77
|
-
let definitionLookup = new CachingDefinitionLookup(adapter, localIndexer.prerenderer, virtualNetwork, createPrerenderAuth);
|
|
78
|
-
definitionLookup.registerRealm({
|
|
79
|
-
url: testRealmURL,
|
|
80
|
-
async getRealmOwnerUserId() {
|
|
81
|
-
return "@user1:localhost";
|
|
82
|
-
},
|
|
83
|
-
async visibility() {
|
|
84
|
-
return "private";
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
indexQueryEngine = new IndexQueryEngine(adapter, definitionLookup, virtualNetwork);
|
|
88
|
-
});
|
|
89
|
-
(0, import_qunit.test)("sweepUnreferencedScopedCSS drops rows no live row references, scoped to the given realm", async function(assert) {
|
|
90
|
-
let liveHash = "1".repeat(32);
|
|
91
|
-
let tombstonedHash = "2".repeat(32);
|
|
92
|
-
let orphanHash = "3".repeat(32);
|
|
93
|
-
let foreignHash = "4".repeat(32);
|
|
94
|
-
let prerenderedOnlyHash = "5".repeat(32);
|
|
95
|
-
let freshHash = "6".repeat(32);
|
|
96
|
-
let hashedDep = (hash) => `${testRealmURL}style-source.gts.md5-${hash}.glimmer-scoped.css`;
|
|
97
|
-
await setupIndex(adapter, [{
|
|
98
|
-
realm_url: testRealmURL,
|
|
99
|
-
current_generation: 1
|
|
100
|
-
}, {
|
|
101
|
-
realm_url: testRealmURL2,
|
|
102
|
-
current_generation: 1
|
|
103
|
-
}], [
|
|
104
|
-
{
|
|
105
|
-
url: `${testRealmURL}1.json`,
|
|
106
|
-
realm_url: testRealmURL,
|
|
107
|
-
deps: [hashedDep(liveHash)]
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
url: `${testRealmURL}2.json`,
|
|
111
|
-
realm_url: testRealmURL,
|
|
112
|
-
is_deleted: true,
|
|
113
|
-
deps: [hashedDep(tombstonedHash)]
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
url: `${testRealmURL2}A.json`,
|
|
117
|
-
realm_url: testRealmURL2,
|
|
118
|
-
deps: [hashedDep(foreignHash)]
|
|
119
|
-
}
|
|
120
|
-
]);
|
|
121
|
-
await adapter.execute(`INSERT INTO prerendered_html (url, file_alias, realm_url, type, generation, last_known_good_deps)
|
|
122
|
-
VALUES ('${testRealmURL}3.json', '${testRealmURL}3.json', '${testRealmURL}', 'instance', 1,
|
|
123
|
-
'${JSON.stringify([hashedDep(prerenderedOnlyHash)])}')`);
|
|
124
|
-
let sweepable = Date.now() - 2880 * 60 * 1e3;
|
|
125
|
-
for (let [realmUrl, hash, lastInternedAt] of [
|
|
126
|
-
[
|
|
127
|
-
testRealmURL,
|
|
128
|
-
liveHash,
|
|
129
|
-
sweepable
|
|
130
|
-
],
|
|
131
|
-
[
|
|
132
|
-
testRealmURL,
|
|
133
|
-
tombstonedHash,
|
|
134
|
-
sweepable
|
|
135
|
-
],
|
|
136
|
-
[
|
|
137
|
-
testRealmURL,
|
|
138
|
-
orphanHash,
|
|
139
|
-
sweepable
|
|
140
|
-
],
|
|
141
|
-
[
|
|
142
|
-
testRealmURL,
|
|
143
|
-
prerenderedOnlyHash,
|
|
144
|
-
sweepable
|
|
145
|
-
],
|
|
146
|
-
[
|
|
147
|
-
testRealmURL,
|
|
148
|
-
freshHash,
|
|
149
|
-
Date.now()
|
|
150
|
-
],
|
|
151
|
-
[
|
|
152
|
-
testRealmURL2,
|
|
153
|
-
foreignHash,
|
|
154
|
-
sweepable
|
|
155
|
-
]
|
|
156
|
-
]) await adapter.execute(`INSERT INTO scoped_css (realm_url, hash, css, last_interned_at)
|
|
157
|
-
VALUES ('${realmUrl}', '${hash}', '.x {}', ${lastInternedAt})`);
|
|
158
|
-
let swept = await sweepUnreferencedScopedCSS(adapter, testRealmURL);
|
|
159
|
-
assert.strictEqual(swept, 2, "the orphan and the tombstone-only rows were swept");
|
|
160
|
-
let remaining = await adapter.execute(`SELECT realm_url, hash FROM scoped_css ORDER BY hash`);
|
|
161
|
-
assert.deepEqual(remaining, [
|
|
162
|
-
{
|
|
163
|
-
realm_url: testRealmURL,
|
|
164
|
-
hash: liveHash
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
realm_url: testRealmURL2,
|
|
168
|
-
hash: foreignHash
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
realm_url: testRealmURL,
|
|
172
|
-
hash: prerenderedOnlyHash
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
realm_url: testRealmURL,
|
|
176
|
-
hash: freshHash
|
|
177
|
-
}
|
|
178
|
-
], "the live-referenced, prerendered-only-referenced, within-grace, and other realm's rows survived");
|
|
179
|
-
});
|
|
180
|
-
(0, import_qunit.test)("can perform invalidations for a instance entry", async function(assert) {
|
|
181
|
-
await setupIndex(adapter, [{
|
|
182
|
-
realm_url: testRealmURL,
|
|
183
|
-
current_generation: 1
|
|
184
|
-
}, {
|
|
185
|
-
realm_url: testRealmURL2,
|
|
186
|
-
current_generation: 5
|
|
187
|
-
}], [
|
|
188
|
-
{
|
|
189
|
-
url: `${testRealmURL}1.json`,
|
|
190
|
-
generation: 1,
|
|
191
|
-
realm_url: testRealmURL,
|
|
192
|
-
deps: [`${testRealmURL}2.json`]
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
url: `${testRealmURL}2.json`,
|
|
196
|
-
generation: 1,
|
|
197
|
-
realm_url: testRealmURL,
|
|
198
|
-
deps: [`${testRealmURL}4.json`]
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
url: `${testRealmURL}3.json`,
|
|
202
|
-
generation: 1,
|
|
203
|
-
realm_url: testRealmURL,
|
|
204
|
-
deps: [`${testRealmURL}2.json`]
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
url: `${testRealmURL}4.json`,
|
|
208
|
-
generation: 1,
|
|
209
|
-
realm_url: testRealmURL,
|
|
210
|
-
deps: []
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
url: `${testRealmURL}5.json`,
|
|
214
|
-
generation: 1,
|
|
215
|
-
realm_url: testRealmURL,
|
|
216
|
-
deps: []
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
url: `${testRealmURL2}A.json`,
|
|
220
|
-
generation: 5,
|
|
221
|
-
realm_url: testRealmURL2,
|
|
222
|
-
deps: []
|
|
223
|
-
}
|
|
224
|
-
]);
|
|
225
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
226
|
-
await batch.invalidate([new URL(`${testRealmURL}4.json`)]);
|
|
227
|
-
let invalidations = batch.invalidations;
|
|
228
|
-
assert.deepEqual(invalidations.sort(), [
|
|
229
|
-
`${testRealmURL}1.json`,
|
|
230
|
-
`${testRealmURL}2.json`,
|
|
231
|
-
`${testRealmURL}3.json`,
|
|
232
|
-
`${testRealmURL}4.json`
|
|
233
|
-
]);
|
|
234
|
-
let invalidatedEntries = await adapter.execute("SELECT url, realm_url, is_deleted FROM boxel_index_pending WHERE generation = 2 ORDER BY url COLLATE \"POSIX\"", { coerceTypes: { is_deleted: "BOOLEAN" } });
|
|
235
|
-
assert.deepEqual(invalidatedEntries, [
|
|
236
|
-
1,
|
|
237
|
-
2,
|
|
238
|
-
3,
|
|
239
|
-
4
|
|
240
|
-
].map((i) => ({
|
|
241
|
-
url: `${testRealmURL}${i}.json`,
|
|
242
|
-
realm_url: testRealmURL,
|
|
243
|
-
is_deleted: true
|
|
244
|
-
})), "the \"work-in-progress\" version of the index entries have been marked as deleted");
|
|
245
|
-
let otherRealms = await adapter.execute(`SELECT url, realm_url, generation, is_deleted FROM boxel_index WHERE realm_url != '${testRealmURL}'`, { coerceTypes: { is_deleted: "BOOLEAN" } });
|
|
246
|
-
assert.deepEqual(otherRealms, [{
|
|
247
|
-
url: `${testRealmURL2}A.json`,
|
|
248
|
-
realm_url: testRealmURL2,
|
|
249
|
-
generation: 5,
|
|
250
|
-
is_deleted: null
|
|
251
|
-
}], "the index entries from other realms are unchanged");
|
|
252
|
-
let generations = await adapter.execute("select realm_url, current_generation from realm_generations ORDER BY realm_url COLLATE \"POSIX\"");
|
|
253
|
-
assert.deepEqual(generations, [{
|
|
254
|
-
realm_url: `${testRealmURL}`,
|
|
255
|
-
current_generation: 1
|
|
256
|
-
}, {
|
|
257
|
-
realm_url: `${testRealmURL2}`,
|
|
258
|
-
current_generation: 5
|
|
259
|
-
}], "the \"production\" realm generations are correct");
|
|
260
|
-
});
|
|
261
|
-
(0, import_qunit.test)("prefetchFileMeta serves per-visit created-at + content-meta lookups from one batched read", async function(assert) {
|
|
262
|
-
let seeded = await persistFileMeta(adapter, testRealmURL, [
|
|
263
|
-
{
|
|
264
|
-
path: "1.json",
|
|
265
|
-
contentHash: "hash-1",
|
|
266
|
-
contentSize: 11
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
path: "2.json",
|
|
270
|
-
contentHash: "hash-2",
|
|
271
|
-
contentSize: 22
|
|
272
|
-
},
|
|
273
|
-
{ path: "3.json" }
|
|
274
|
-
]);
|
|
275
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
276
|
-
await batch.prefetchFileMeta([
|
|
277
|
-
"1.json",
|
|
278
|
-
"2.json",
|
|
279
|
-
"3.json",
|
|
280
|
-
"4.json"
|
|
281
|
-
]);
|
|
282
|
-
let executeCalls = 0;
|
|
283
|
-
let origExecute = adapter.execute.bind(adapter);
|
|
284
|
-
adapter.execute = (sql, opts) => {
|
|
285
|
-
executeCalls++;
|
|
286
|
-
return origExecute(sql, opts);
|
|
287
|
-
};
|
|
288
|
-
try {
|
|
289
|
-
assert.deepEqual(await batch.getContentMeta("1.json"), {
|
|
290
|
-
contentHash: "hash-1",
|
|
291
|
-
contentSize: 11
|
|
292
|
-
});
|
|
293
|
-
assert.deepEqual(await batch.getContentMeta("2.json"), {
|
|
294
|
-
contentHash: "hash-2",
|
|
295
|
-
contentSize: 22
|
|
296
|
-
});
|
|
297
|
-
assert.deepEqual(await batch.getContentMeta("3.json"), {
|
|
298
|
-
contentHash: void 0,
|
|
299
|
-
contentSize: void 0
|
|
300
|
-
}, "a file with a row but no persisted hash/size is served as undefined from the cache");
|
|
301
|
-
assert.strictEqual(await batch.ensureFileCreatedAt("1.json"), seeded.get("1.json").createdAt, "created_at is served from the cache");
|
|
302
|
-
assert.strictEqual(executeCalls, 0, "prefetched lookups make no DB round-trips");
|
|
303
|
-
} finally {
|
|
304
|
-
adapter.execute = origExecute;
|
|
305
|
-
}
|
|
306
|
-
let created4 = await batch.ensureFileCreatedAt("4.json");
|
|
307
|
-
assert.true(created4 > 0, "an unprefetched file still gets a created_at via the per-path fallback");
|
|
308
|
-
assert.deepEqual(await batch.getContentMeta("4.json"), {
|
|
309
|
-
contentHash: void 0,
|
|
310
|
-
contentSize: void 0
|
|
311
|
-
}, "an unprefetched file with no hash/size falls back to a per-path read");
|
|
312
|
-
});
|
|
313
|
-
(0, import_qunit.test)("buffered index writes defer until flush, and a dependency read flushes them first", async function(assert) {
|
|
314
|
-
await setupIndex(adapter, [{
|
|
315
|
-
realm_url: testRealmURL,
|
|
316
|
-
current_generation: 1
|
|
317
|
-
}], []);
|
|
318
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, void 0, { splitPrerenderHtml: true });
|
|
319
|
-
let depURL = new URL(`${testRealmURL}a.json`);
|
|
320
|
-
let dependentURL = new URL(`${testRealmURL}b.json`);
|
|
321
|
-
let fileEntry = (name) => ({
|
|
322
|
-
type: "file",
|
|
323
|
-
lastModified: 1,
|
|
324
|
-
resourceCreatedAt: 1,
|
|
325
|
-
deps: /* @__PURE__ */ new Set(),
|
|
326
|
-
searchData: { name }
|
|
327
|
-
});
|
|
328
|
-
await batch.bufferEntry(depURL, fileEntry("a"));
|
|
329
|
-
await batch.bufferEntry(dependentURL, fileEntry("b"));
|
|
330
|
-
assert.deepEqual([...batch.invalidations].sort(), [depURL.href, dependentURL.href], "buffered URLs join the invalidation set synchronously");
|
|
331
|
-
let beforeFlush = await adapter.execute(`SELECT url FROM boxel_index_pending WHERE realm_url = $1`, { bind: [testRealmURL] });
|
|
332
|
-
assert.deepEqual(beforeFlush, [], "no rows are written while buffered");
|
|
333
|
-
let depRows = await batch.getDependencyRows([depURL.href]);
|
|
334
|
-
assert.deepEqual(depRows.map((r) => r.url), [depURL.href], "the dependency read returns the now-flushed buffered row");
|
|
335
|
-
let afterFlush = await adapter.execute(`SELECT url FROM boxel_index_pending WHERE realm_url = $1 ORDER BY url COLLATE "POSIX"`, { bind: [testRealmURL] });
|
|
336
|
-
assert.deepEqual(afterFlush, [{ url: depURL.href }, { url: dependentURL.href }], "the flush coalesced all buffered rows into the pending table");
|
|
337
|
-
});
|
|
338
|
-
(0, import_qunit.test)("can perform invalidations for a module change via instance deps", async function(assert) {
|
|
339
|
-
await setupIndex(adapter, [{
|
|
340
|
-
realm_url: testRealmURL,
|
|
341
|
-
current_generation: 1
|
|
342
|
-
}, {
|
|
343
|
-
realm_url: testRealmURL2,
|
|
344
|
-
current_generation: 5
|
|
345
|
-
}], [
|
|
346
|
-
{
|
|
347
|
-
url: `${testRealmURL}1.json`,
|
|
348
|
-
file_alias: `${testRealmURL}1.json`,
|
|
349
|
-
type: "instance",
|
|
350
|
-
generation: 1,
|
|
351
|
-
realm_url: testRealmURL,
|
|
352
|
-
deps: [`${testRealmURL}employee`, `${testRealmURL}person`]
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
url: `${testRealmURL}2.json`,
|
|
356
|
-
file_alias: `${testRealmURL}2.json`,
|
|
357
|
-
type: "instance",
|
|
358
|
-
generation: 1,
|
|
359
|
-
realm_url: testRealmURL,
|
|
360
|
-
deps: [`${testRealmURL}1.json`]
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
url: `${testRealmURL}3.json`,
|
|
364
|
-
file_alias: `${testRealmURL}3.json`,
|
|
365
|
-
type: "instance",
|
|
366
|
-
generation: 1,
|
|
367
|
-
realm_url: testRealmURL,
|
|
368
|
-
deps: []
|
|
369
|
-
}
|
|
370
|
-
]);
|
|
371
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
372
|
-
await batch.invalidate([new URL(`${testRealmURL}person.gts`)]);
|
|
373
|
-
let invalidations = batch.invalidations;
|
|
374
|
-
assert.deepEqual(invalidations.sort(), [
|
|
375
|
-
`${testRealmURL}1.json`,
|
|
376
|
-
`${testRealmURL}2.json`,
|
|
377
|
-
`${testRealmURL}person.gts`
|
|
378
|
-
]);
|
|
379
|
-
});
|
|
380
|
-
(0, import_qunit.test)("invalidations reach dependents whose rows exist only in the production index", async function(assert) {
|
|
381
|
-
await setupIndex(adapter, [{
|
|
382
|
-
realm_url: testRealmURL,
|
|
383
|
-
current_generation: 1
|
|
384
|
-
}], {
|
|
385
|
-
working: [],
|
|
386
|
-
production: [
|
|
387
|
-
{
|
|
388
|
-
url: `${testRealmURL}1.json`,
|
|
389
|
-
file_alias: `${testRealmURL}1.json`,
|
|
390
|
-
type: "instance",
|
|
391
|
-
generation: 1,
|
|
392
|
-
realm_url: testRealmURL,
|
|
393
|
-
deps: [`${testRealmURL}person`]
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
url: `${testRealmURL}2.json`,
|
|
397
|
-
file_alias: `${testRealmURL}2.json`,
|
|
398
|
-
type: "instance",
|
|
399
|
-
generation: 1,
|
|
400
|
-
realm_url: testRealmURL,
|
|
401
|
-
deps: [`${testRealmURL}1.json`]
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
url: `${testRealmURL}3.json`,
|
|
405
|
-
file_alias: `${testRealmURL}3.json`,
|
|
406
|
-
type: "instance",
|
|
407
|
-
generation: 1,
|
|
408
|
-
realm_url: testRealmURL,
|
|
409
|
-
is_deleted: true,
|
|
410
|
-
deps: [`${testRealmURL}person`]
|
|
411
|
-
}
|
|
412
|
-
]
|
|
413
|
-
}, { prerenderedHtml: false });
|
|
414
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
415
|
-
await batch.invalidate([new URL(`${testRealmURL}person.gts`)]);
|
|
416
|
-
assert.deepEqual(batch.invalidations.sort(), [
|
|
417
|
-
`${testRealmURL}1.json`,
|
|
418
|
-
`${testRealmURL}2.json`,
|
|
419
|
-
`${testRealmURL}person.gts`
|
|
420
|
-
]);
|
|
421
|
-
});
|
|
422
|
-
(0, import_qunit.test)("invalidations don't cross realm boundaries", async function(assert) {
|
|
423
|
-
await setupIndex(adapter, [{
|
|
424
|
-
realm_url: testRealmURL,
|
|
425
|
-
current_generation: 1
|
|
426
|
-
}, {
|
|
427
|
-
realm_url: testRealmURL2,
|
|
428
|
-
current_generation: 5
|
|
429
|
-
}], [{
|
|
430
|
-
url: `${testRealmURL2}luke.json`,
|
|
431
|
-
file_alias: `${testRealmURL2}luke.json`,
|
|
432
|
-
type: "instance",
|
|
433
|
-
generation: 1,
|
|
434
|
-
realm_url: testRealmURL2,
|
|
435
|
-
deps: [`${testRealmURL}person`]
|
|
436
|
-
}]);
|
|
437
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
438
|
-
await batch.invalidate([new URL(`${testRealmURL}person.gts`)]);
|
|
439
|
-
let invalidations = batch.invalidations;
|
|
440
|
-
assert.deepEqual(invalidations, [`${testRealmURL}person.gts`]);
|
|
441
|
-
});
|
|
442
|
-
(0, import_qunit.test)("can update an index entry", async function(assert) {
|
|
443
|
-
await setupIndex(adapter, [{
|
|
444
|
-
realm_url: testRealmURL,
|
|
445
|
-
current_generation: 1
|
|
446
|
-
}], [{
|
|
447
|
-
url: `${testRealmURL}1.json`,
|
|
448
|
-
generation: 1,
|
|
449
|
-
realm_url: testRealmURL,
|
|
450
|
-
pristine_doc: {
|
|
451
|
-
id: `${testRealmURL}1.json`,
|
|
452
|
-
type: "card",
|
|
453
|
-
attributes: { name: "Mango" },
|
|
454
|
-
meta: { adoptsFrom: {
|
|
455
|
-
module: rri(`./person`),
|
|
456
|
-
name: "Person"
|
|
457
|
-
} }
|
|
458
|
-
},
|
|
459
|
-
search_doc: { name: "Mango" },
|
|
460
|
-
deps: [`${testRealmURL}person`],
|
|
461
|
-
types: [{
|
|
462
|
-
module: rri(`./person`),
|
|
463
|
-
name: "Person"
|
|
464
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
465
|
-
}]);
|
|
466
|
-
let resource = {
|
|
467
|
-
id: testRRI("1.json"),
|
|
468
|
-
type: "card",
|
|
469
|
-
attributes: { name: "Van Gogh" },
|
|
470
|
-
meta: { adoptsFrom: {
|
|
471
|
-
module: rri(`./fancy-person`),
|
|
472
|
-
name: "FancyPerson"
|
|
473
|
-
} }
|
|
474
|
-
};
|
|
475
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
476
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
477
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
478
|
-
type: "instance",
|
|
479
|
-
resource,
|
|
480
|
-
lastModified: Date.now(),
|
|
481
|
-
resourceCreatedAt: Date.now(),
|
|
482
|
-
searchData: { name: "Van Gogh" },
|
|
483
|
-
deps: new Set([`${testRealmURL}fancy-person`]),
|
|
484
|
-
displayNames: [
|
|
485
|
-
"Fancy Person",
|
|
486
|
-
"Person",
|
|
487
|
-
"Card"
|
|
488
|
-
],
|
|
489
|
-
types: [
|
|
490
|
-
{
|
|
491
|
-
module: rri(`./fancy-person`),
|
|
492
|
-
name: "FancyPerson"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
module: rri(`./person`),
|
|
496
|
-
name: "Person"
|
|
497
|
-
},
|
|
498
|
-
baseCardRef
|
|
499
|
-
].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
500
|
-
});
|
|
501
|
-
let [liveVersion] = await adapter.execute(`SELECT generation, pristine_doc, search_doc, deps, types FROM boxel_index WHERE url = $1`, {
|
|
502
|
-
bind: [`${testRealmURL}1.json`],
|
|
503
|
-
coerceTypes: {
|
|
504
|
-
pristine_doc: "JSON",
|
|
505
|
-
search_doc: "JSON",
|
|
506
|
-
deps: "JSON",
|
|
507
|
-
types: "JSON"
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
assert.deepEqual(liveVersion, {
|
|
511
|
-
generation: 1,
|
|
512
|
-
pristine_doc: {
|
|
513
|
-
id: `${testRealmURL}1.json`,
|
|
514
|
-
type: "card",
|
|
515
|
-
attributes: { name: "Mango" },
|
|
516
|
-
meta: { adoptsFrom: {
|
|
517
|
-
module: rri(`./person`),
|
|
518
|
-
name: "Person"
|
|
519
|
-
} }
|
|
520
|
-
},
|
|
521
|
-
search_doc: { name: "Mango" },
|
|
522
|
-
deps: [`${testRealmURL}person`],
|
|
523
|
-
types: [{
|
|
524
|
-
module: rri(`./person`),
|
|
525
|
-
name: "Person"
|
|
526
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
527
|
-
}, "live version of the doc has not changed");
|
|
528
|
-
let [wipVersion] = await adapter.execute(`SELECT generation, pristine_doc, search_doc, deps, types FROM boxel_index_pending WHERE url = $1`, {
|
|
529
|
-
bind: [`${testRealmURL}1.json`],
|
|
530
|
-
coerceTypes: {
|
|
531
|
-
pristine_doc: "JSON",
|
|
532
|
-
search_doc: "JSON",
|
|
533
|
-
deps: "JSON",
|
|
534
|
-
types: "JSON"
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
assert.deepEqual(wipVersion, {
|
|
538
|
-
generation: 2,
|
|
539
|
-
pristine_doc: {
|
|
540
|
-
id: `${testRealmURL}1.json`,
|
|
541
|
-
type: "card",
|
|
542
|
-
attributes: { name: "Van Gogh" },
|
|
543
|
-
meta: { adoptsFrom: {
|
|
544
|
-
module: rri(`./fancy-person`),
|
|
545
|
-
name: "FancyPerson"
|
|
546
|
-
} }
|
|
547
|
-
},
|
|
548
|
-
search_doc: { name: "Van Gogh" },
|
|
549
|
-
deps: [`${testRealmURL}fancy-person`],
|
|
550
|
-
types: [
|
|
551
|
-
{
|
|
552
|
-
module: rri(`./fancy-person`),
|
|
553
|
-
name: "FancyPerson"
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
module: rri(`./person`),
|
|
557
|
-
name: "Person"
|
|
558
|
-
},
|
|
559
|
-
baseCardRef
|
|
560
|
-
].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
561
|
-
}, "WIP version of the doc exists");
|
|
562
|
-
await batch.done();
|
|
563
|
-
let [finalVersion] = await adapter.execute(`SELECT generation, pristine_doc, search_doc, deps, types FROM boxel_index WHERE url = $1`, {
|
|
564
|
-
bind: [`${testRealmURL}1.json`],
|
|
565
|
-
coerceTypes: {
|
|
566
|
-
pristine_doc: "JSON",
|
|
567
|
-
search_doc: "JSON",
|
|
568
|
-
deps: "JSON",
|
|
569
|
-
types: "JSON"
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
assert.deepEqual(finalVersion, {
|
|
573
|
-
generation: 2,
|
|
574
|
-
pristine_doc: {
|
|
575
|
-
id: `${testRealmURL}1.json`,
|
|
576
|
-
type: "card",
|
|
577
|
-
attributes: { name: "Van Gogh" },
|
|
578
|
-
meta: { adoptsFrom: {
|
|
579
|
-
module: rri(`./fancy-person`),
|
|
580
|
-
name: "FancyPerson"
|
|
581
|
-
} }
|
|
582
|
-
},
|
|
583
|
-
search_doc: { name: "Van Gogh" },
|
|
584
|
-
deps: [`${testRealmURL}fancy-person`],
|
|
585
|
-
types: [
|
|
586
|
-
{
|
|
587
|
-
module: rri(`./fancy-person`),
|
|
588
|
-
name: "FancyPerson"
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
module: rri(`./person`),
|
|
592
|
-
name: "Person"
|
|
593
|
-
},
|
|
594
|
-
baseCardRef
|
|
595
|
-
].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
596
|
-
}, "final version of the doc exists");
|
|
597
|
-
});
|
|
598
|
-
(0, import_qunit.test)("sanitizes jsonb-illegal code points in content columns before write", async function(assert) {
|
|
599
|
-
const NUL = "\0";
|
|
600
|
-
const LONE_HIGH = "\ud83e";
|
|
601
|
-
const LONE_LOW = "\udde9";
|
|
602
|
-
const VALID_EMOJI = "🧩";
|
|
603
|
-
const REPLACEMENT = "�";
|
|
604
|
-
await setupIndex(adapter, [{
|
|
605
|
-
realm_url: testRealmURL,
|
|
606
|
-
current_generation: 1
|
|
607
|
-
}], []);
|
|
608
|
-
let resource = {
|
|
609
|
-
id: testRRI("1.json"),
|
|
610
|
-
type: "card",
|
|
611
|
-
attributes: {
|
|
612
|
-
name: `Van${NUL}Gogh`,
|
|
613
|
-
bio: `high:${LONE_HIGH} emoji:${VALID_EMOJI} low:${LONE_LOW}`
|
|
614
|
-
},
|
|
615
|
-
meta: { adoptsFrom: {
|
|
616
|
-
module: rri(`./person`),
|
|
617
|
-
name: "Person"
|
|
618
|
-
} }
|
|
619
|
-
};
|
|
620
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
621
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
622
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
623
|
-
type: "instance",
|
|
624
|
-
resource,
|
|
625
|
-
lastModified: Date.now(),
|
|
626
|
-
resourceCreatedAt: Date.now(),
|
|
627
|
-
searchData: {
|
|
628
|
-
name: `Van${NUL}Gogh`,
|
|
629
|
-
bio: `high:${LONE_HIGH} emoji:${VALID_EMOJI} low:${LONE_LOW}`
|
|
630
|
-
},
|
|
631
|
-
markdown: `# Title${NUL} ${LONE_HIGH} keep ${VALID_EMOJI}`,
|
|
632
|
-
deps: new Set([`${testRealmURL}person`]),
|
|
633
|
-
displayNames: [`Person${NUL}`],
|
|
634
|
-
types: [{
|
|
635
|
-
module: rri(`./person`),
|
|
636
|
-
name: "Person"
|
|
637
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork))
|
|
638
|
-
});
|
|
639
|
-
let [row] = await adapter.execute(`SELECT pristine_doc, search_doc, display_names FROM boxel_index_pending WHERE url = $1`, {
|
|
640
|
-
bind: [`${testRealmURL}1.json`],
|
|
641
|
-
coerceTypes: {
|
|
642
|
-
pristine_doc: "JSON",
|
|
643
|
-
search_doc: "JSON",
|
|
644
|
-
display_names: "JSON"
|
|
645
|
-
}
|
|
646
|
-
});
|
|
647
|
-
let pristine = row.pristine_doc;
|
|
648
|
-
let search = row.search_doc;
|
|
649
|
-
let displayNames = row.display_names;
|
|
650
|
-
assert.strictEqual(pristine.attributes?.name, `Van${REPLACEMENT}Gogh`, "NUL in pristine_doc string is replaced");
|
|
651
|
-
assert.strictEqual(search.name, `Van${REPLACEMENT}Gogh`, "NUL in search_doc string is replaced");
|
|
652
|
-
assert.strictEqual(search.bio, `high:${REPLACEMENT} emoji:${VALID_EMOJI} low:${REPLACEMENT}`, "lone surrogates are replaced while the valid emoji pair is preserved");
|
|
653
|
-
let [renderedRow] = await adapter.execute(`SELECT markdown FROM prerendered_html_pending WHERE url = $1`, { bind: [`${testRealmURL}1.json`] });
|
|
654
|
-
assert.strictEqual(renderedRow.markdown, `# Title${REPLACEMENT} ${REPLACEMENT} keep ${VALID_EMOJI}`, "markdown column is sanitized and keeps the valid emoji");
|
|
655
|
-
assert.deepEqual(displayNames, [`Person${REPLACEMENT}`], "display_names entries are sanitized");
|
|
656
|
-
});
|
|
657
|
-
(0, import_qunit.test)("lands prerendered HTML on the prerendered_html channel and swaps it into production on done", async function(assert) {
|
|
658
|
-
let types = [{
|
|
659
|
-
module: rri(`./person`),
|
|
660
|
-
name: "Person"
|
|
661
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork));
|
|
662
|
-
await setupIndex(adapter, [{
|
|
663
|
-
realm_url: testRealmURL,
|
|
664
|
-
current_generation: 1
|
|
665
|
-
}], [{
|
|
666
|
-
url: `${testRealmURL}1.json`,
|
|
667
|
-
generation: 1,
|
|
668
|
-
realm_url: testRealmURL,
|
|
669
|
-
type: "instance"
|
|
670
|
-
}]);
|
|
671
|
-
let resource = {
|
|
672
|
-
id: testRRI("1.json"),
|
|
673
|
-
type: "card",
|
|
674
|
-
attributes: { name: "Van Gogh" },
|
|
675
|
-
meta: { adoptsFrom: {
|
|
676
|
-
module: rri(`./person`),
|
|
677
|
-
name: "Person"
|
|
678
|
-
} }
|
|
679
|
-
};
|
|
680
|
-
let embeddedHtml = Object.fromEntries(types.map((type) => [type, `<div class="embedded">${type}</div>`]));
|
|
681
|
-
let fittedHtml = Object.fromEntries(types.map((type) => [type, `<div class="fitted">${type}</div>`]));
|
|
682
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
683
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
684
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
685
|
-
type: "instance",
|
|
686
|
-
resource,
|
|
687
|
-
lastModified: Date.now(),
|
|
688
|
-
resourceCreatedAt: Date.now(),
|
|
689
|
-
searchData: { name: "Van Gogh" },
|
|
690
|
-
deps: new Set([`${testRealmURL}person`]),
|
|
691
|
-
displayNames: ["Person", "Card"],
|
|
692
|
-
types,
|
|
693
|
-
embeddedHtml,
|
|
694
|
-
fittedHtml,
|
|
695
|
-
isolatedHtml: `<div class="isolated">Isolated</div>`,
|
|
696
|
-
atomHtml: `<span class="atom">Atom</span>`,
|
|
697
|
-
headHtml: `<span class="head">Head</span>`,
|
|
698
|
-
iconHTML: `<svg>icon</svg>`,
|
|
699
|
-
markdown: "Van Gogh markdown"
|
|
700
|
-
});
|
|
701
|
-
await batch.done();
|
|
702
|
-
let [rendered] = await adapter.execute(`SELECT url, realm_url, type, fitted_html, embedded_html, isolated_html, atom_html, head_html, markdown, deps, generation, is_deleted, error_doc
|
|
703
|
-
FROM prerendered_html WHERE url = $1`, {
|
|
704
|
-
bind: [`${testRealmURL}1.json`],
|
|
705
|
-
coerceTypes: {
|
|
706
|
-
fitted_html: "JSON",
|
|
707
|
-
embedded_html: "JSON",
|
|
708
|
-
deps: "JSON",
|
|
709
|
-
error_doc: "JSON",
|
|
710
|
-
is_deleted: "BOOLEAN"
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
assert.deepEqual(rendered, {
|
|
714
|
-
url: `${testRealmURL}1.json`,
|
|
715
|
-
realm_url: testRealmURL,
|
|
716
|
-
type: "instance",
|
|
717
|
-
fitted_html: fittedHtml,
|
|
718
|
-
embedded_html: embeddedHtml,
|
|
719
|
-
isolated_html: `<div class="isolated">Isolated</div>`,
|
|
720
|
-
atom_html: `<span class="atom">Atom</span>`,
|
|
721
|
-
head_html: `<span class="head">Head</span>`,
|
|
722
|
-
markdown: "Van Gogh markdown",
|
|
723
|
-
deps: [`${testRealmURL}person`],
|
|
724
|
-
generation: 2,
|
|
725
|
-
is_deleted: false,
|
|
726
|
-
error_doc: null
|
|
727
|
-
}, "prerendered_html carries the HTML at the job generation");
|
|
728
|
-
let [indexRow] = await adapter.execute(`SELECT icon_html FROM boxel_index WHERE url = $1`, { bind: [`${testRealmURL}1.json`] });
|
|
729
|
-
assert.strictEqual(indexRow.icon_html, `<svg>icon</svg>`, "icon_html lives on boxel_index (not part of prerendered_html)");
|
|
730
|
-
});
|
|
731
|
-
(0, import_qunit.test)("tombstones the prerendered_html row on delete, preserving last-known HTML", async function(assert) {
|
|
732
|
-
await setupIndex(adapter, [{
|
|
733
|
-
realm_url: testRealmURL,
|
|
734
|
-
current_generation: 1
|
|
735
|
-
}], [{
|
|
736
|
-
url: `${testRealmURL}1.json`,
|
|
737
|
-
generation: 1,
|
|
738
|
-
realm_url: testRealmURL,
|
|
739
|
-
type: "instance"
|
|
740
|
-
}]);
|
|
741
|
-
let resource = {
|
|
742
|
-
id: testRRI("1.json"),
|
|
743
|
-
type: "card",
|
|
744
|
-
attributes: { name: "Van Gogh" },
|
|
745
|
-
meta: { adoptsFrom: {
|
|
746
|
-
module: rri(`./person`),
|
|
747
|
-
name: "Person"
|
|
748
|
-
} }
|
|
749
|
-
};
|
|
750
|
-
let batch1 = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
751
|
-
await batch1.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
752
|
-
await batch1.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
753
|
-
type: "instance",
|
|
754
|
-
resource,
|
|
755
|
-
lastModified: Date.now(),
|
|
756
|
-
resourceCreatedAt: Date.now(),
|
|
757
|
-
searchData: { name: "Van Gogh" },
|
|
758
|
-
deps: new Set([`${testRealmURL}person`]),
|
|
759
|
-
displayNames: ["Person"],
|
|
760
|
-
types: [{
|
|
761
|
-
module: rri(`./person`),
|
|
762
|
-
name: "Person"
|
|
763
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork)),
|
|
764
|
-
isolatedHtml: `<div class="isolated">Isolated</div>`,
|
|
765
|
-
markdown: "Van Gogh markdown"
|
|
766
|
-
});
|
|
767
|
-
await batch1.done();
|
|
768
|
-
let batch2 = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
769
|
-
await batch2.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
770
|
-
await batch2.done();
|
|
771
|
-
let [rendered] = await adapter.execute(`SELECT is_deleted, isolated_html, markdown, generation FROM prerendered_html WHERE url = $1`, {
|
|
772
|
-
bind: [`${testRealmURL}1.json`],
|
|
773
|
-
coerceTypes: { is_deleted: "BOOLEAN" }
|
|
774
|
-
});
|
|
775
|
-
assert.true(rendered.is_deleted, "prerendered_html row is tombstoned");
|
|
776
|
-
assert.strictEqual(rendered.isolated_html, `<div class="isolated">Isolated</div>`, "last-known HTML is preserved on the tombstone");
|
|
777
|
-
assert.strictEqual(rendered.generation, 3, "tombstone stamped at the deleting job generation");
|
|
778
|
-
let [indexRow] = await adapter.execute(`SELECT is_deleted FROM boxel_index WHERE url = $1`, {
|
|
779
|
-
bind: [`${testRealmURL}1.json`],
|
|
780
|
-
coerceTypes: { is_deleted: "BOOLEAN" }
|
|
781
|
-
});
|
|
782
|
-
assert.true(indexRow.is_deleted, "boxel_index row is tombstoned in lockstep");
|
|
783
|
-
});
|
|
784
|
-
const SQLITE_BIND_BUDGET = 900;
|
|
785
|
-
const seedRenderedRows = (count) => {
|
|
786
|
-
let rows = [];
|
|
787
|
-
for (let i = 1; i <= count; i++) rows.push({
|
|
788
|
-
url: `${testRealmURL}${i}.json`,
|
|
789
|
-
generation: 1,
|
|
790
|
-
realm_url: testRealmURL,
|
|
791
|
-
type: "instance",
|
|
792
|
-
isolated_html: `<div class="isolated">${i}</div>`
|
|
793
|
-
});
|
|
794
|
-
return rows;
|
|
795
|
-
};
|
|
796
|
-
const seededUrls = (rows) => rows.map((row) => new URL(row.url));
|
|
797
|
-
(0, import_qunit.test)("tombstone upserts are chunked and still tombstone every row", async function(assert) {
|
|
798
|
-
const URL_COUNT = 120;
|
|
799
|
-
let indexRows = seedRenderedRows(URL_COUNT);
|
|
800
|
-
await setupIndex(adapter, [{
|
|
801
|
-
realm_url: testRealmURL,
|
|
802
|
-
current_generation: 1
|
|
803
|
-
}], indexRows);
|
|
804
|
-
let oversized = [];
|
|
805
|
-
let originalExecute = adapter.execute.bind(adapter);
|
|
806
|
-
let spy = async (sql, opts) => {
|
|
807
|
-
let table = /INSERT INTO (boxel_index_pending|prerendered_html_pending)/.exec(sql)?.[1];
|
|
808
|
-
let binds = opts?.bind?.length ?? 0;
|
|
809
|
-
if (table && binds > SQLITE_BIND_BUDGET) oversized.push({
|
|
810
|
-
table,
|
|
811
|
-
binds
|
|
812
|
-
});
|
|
813
|
-
return originalExecute(sql, opts);
|
|
814
|
-
};
|
|
815
|
-
adapter.execute = spy;
|
|
816
|
-
try {
|
|
817
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
818
|
-
await batch.invalidate(seededUrls(indexRows));
|
|
819
|
-
await batch.done();
|
|
820
|
-
} finally {
|
|
821
|
-
adapter.execute = originalExecute;
|
|
822
|
-
}
|
|
823
|
-
assert.deepEqual(oversized, [], "every tombstone upsert is chunked within the adapter bind budget");
|
|
824
|
-
let indexed = await adapter.execute(`SELECT is_deleted FROM boxel_index WHERE realm_url = $1`, {
|
|
825
|
-
bind: [testRealmURL],
|
|
826
|
-
coerceTypes: { is_deleted: "BOOLEAN" }
|
|
827
|
-
});
|
|
828
|
-
assert.strictEqual(indexed.filter((row) => row.is_deleted).length, URL_COUNT, "every boxel_index row is tombstoned");
|
|
829
|
-
let rendered = await adapter.execute(`SELECT is_deleted FROM prerendered_html WHERE realm_url = $1`, {
|
|
830
|
-
bind: [testRealmURL],
|
|
831
|
-
coerceTypes: { is_deleted: "BOOLEAN" }
|
|
832
|
-
});
|
|
833
|
-
assert.strictEqual(rendered.filter((row) => row.is_deleted).length, URL_COUNT, "every prerendered_html row is tombstoned");
|
|
834
|
-
});
|
|
835
|
-
(0, import_qunit.test)("promotes prerendered_html_pending rows resumed from a prior job attempt", async function(assert) {
|
|
836
|
-
let url = `${testRealmURL}1.json`;
|
|
837
|
-
await setupIndex(adapter, [{
|
|
838
|
-
realm_url: testRealmURL,
|
|
839
|
-
current_generation: 1
|
|
840
|
-
}], {
|
|
841
|
-
working: [{
|
|
842
|
-
url,
|
|
843
|
-
generation: 1,
|
|
844
|
-
realm_url: testRealmURL,
|
|
845
|
-
type: "instance",
|
|
846
|
-
job_id: 42,
|
|
847
|
-
staging_id: jobStagingId(42, 1),
|
|
848
|
-
last_modified: String(17e8),
|
|
849
|
-
is_deleted: false,
|
|
850
|
-
deps: [],
|
|
851
|
-
types: [],
|
|
852
|
-
isolated_html: `<div class="isolated">Resumed</div>`,
|
|
853
|
-
markdown: "Resumed markdown"
|
|
854
|
-
}],
|
|
855
|
-
production: []
|
|
856
|
-
});
|
|
857
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
858
|
-
jobId: 42,
|
|
859
|
-
reservationId: 2,
|
|
860
|
-
priority: 0,
|
|
861
|
-
queueWaitMs: null,
|
|
862
|
-
concurrencyGroup: null,
|
|
863
|
-
laneFamily: null
|
|
864
|
-
})).done();
|
|
865
|
-
let [rendered] = await adapter.execute(`SELECT isolated_html, markdown FROM prerendered_html WHERE url = $1`, { bind: [url] });
|
|
866
|
-
assert.strictEqual(rendered?.isolated_html, `<div class="isolated">Resumed</div>`, "resumed row HTML is promoted to prerendered_html");
|
|
867
|
-
assert.strictEqual(rendered?.markdown, "Resumed markdown", "resumed row markdown is promoted to prerendered_html");
|
|
868
|
-
let [indexRow] = await adapter.execute(`SELECT url FROM boxel_index WHERE url = $1`, { bind: [url] });
|
|
869
|
-
assert.strictEqual(indexRow?.url, url, "the boxel_index row is promoted in lockstep for resumed rows");
|
|
870
|
-
});
|
|
871
|
-
(0, import_qunit.test)("mirrors an error entry onto prerendered_html, preserving last-known-good HTML", async function(assert) {
|
|
872
|
-
let url = `${testRealmURL}1.json`;
|
|
873
|
-
let types = [{
|
|
874
|
-
module: rri(`./person`),
|
|
875
|
-
name: "Person"
|
|
876
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork));
|
|
877
|
-
let resource = {
|
|
878
|
-
id: testRRI("1"),
|
|
879
|
-
type: "card",
|
|
880
|
-
attributes: { name: "Mango" },
|
|
881
|
-
meta: { adoptsFrom: {
|
|
882
|
-
module: rri(`./person`),
|
|
883
|
-
name: "Person"
|
|
884
|
-
} }
|
|
885
|
-
};
|
|
886
|
-
await setupIndex(adapter, [{
|
|
887
|
-
realm_url: testRealmURL,
|
|
888
|
-
current_generation: 1
|
|
889
|
-
}], [{
|
|
890
|
-
url,
|
|
891
|
-
generation: 1,
|
|
892
|
-
realm_url: testRealmURL,
|
|
893
|
-
type: "instance",
|
|
894
|
-
is_deleted: false,
|
|
895
|
-
pristine_doc: resource,
|
|
896
|
-
search_doc: { name: "Mango" },
|
|
897
|
-
display_names: ["Person"],
|
|
898
|
-
deps: [`${testRealmURL}person`],
|
|
899
|
-
last_known_good_deps: [`${testRealmURL}person`],
|
|
900
|
-
types,
|
|
901
|
-
isolated_html: `<div class="isolated">Last known good</div>`,
|
|
902
|
-
markdown: "Last known good markdown"
|
|
903
|
-
}]);
|
|
904
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
905
|
-
await batch.updateEntry(new URL(url), {
|
|
906
|
-
type: "instance-error",
|
|
907
|
-
error: {
|
|
908
|
-
message: "boom",
|
|
909
|
-
status: 500,
|
|
910
|
-
additionalErrors: []
|
|
911
|
-
}
|
|
912
|
-
});
|
|
913
|
-
await batch.done();
|
|
914
|
-
let [rendered] = await adapter.execute(`SELECT isolated_html, markdown, error_doc, is_deleted FROM prerendered_html WHERE url = $1`, {
|
|
915
|
-
bind: [url],
|
|
916
|
-
coerceTypes: {
|
|
917
|
-
error_doc: "JSON",
|
|
918
|
-
is_deleted: "BOOLEAN"
|
|
919
|
-
}
|
|
920
|
-
});
|
|
921
|
-
assert.strictEqual(rendered?.error_doc?.message, "boom", "the error rides on prerendered_html.error_doc");
|
|
922
|
-
assert.strictEqual(rendered?.isolated_html, `<div class="isolated">Last known good</div>`, "last-known-good HTML is preserved on the error row");
|
|
923
|
-
assert.strictEqual(rendered?.markdown, "Last known good markdown", "last-known-good markdown is preserved on the error row");
|
|
924
|
-
assert.false(rendered?.is_deleted, "an error row is not a tombstone");
|
|
925
|
-
});
|
|
926
|
-
(0, import_qunit.test)("error entry includes last known good state when available", async function(assert) {
|
|
927
|
-
let types = [{
|
|
928
|
-
module: rri(`./person`),
|
|
929
|
-
name: "Person"
|
|
930
|
-
}, baseCardRef].map((i) => internalKeyFor(i, new URL(testRealmURL), virtualNetwork));
|
|
931
|
-
let modified = Date.now();
|
|
932
|
-
let resource = {
|
|
933
|
-
id: testRRI("1"),
|
|
934
|
-
type: "card",
|
|
935
|
-
attributes: { name: "Mango" },
|
|
936
|
-
meta: { adoptsFrom: {
|
|
937
|
-
module: rri(`./person`),
|
|
938
|
-
name: "Person"
|
|
939
|
-
} }
|
|
940
|
-
};
|
|
941
|
-
await setupIndex(adapter, [{
|
|
942
|
-
realm_url: testRealmURL,
|
|
943
|
-
current_generation: 1
|
|
944
|
-
}], [{
|
|
945
|
-
url: `${testRealmURL}1.json`,
|
|
946
|
-
generation: 1,
|
|
947
|
-
realm_url: testRealmURL,
|
|
948
|
-
pristine_doc: resource,
|
|
949
|
-
search_doc: { name: "Mango" },
|
|
950
|
-
display_names: [`Person`],
|
|
951
|
-
deps: [`${testRealmURL}person`],
|
|
952
|
-
last_known_good_deps: [`${testRealmURL}person`],
|
|
953
|
-
types,
|
|
954
|
-
last_modified: String(modified),
|
|
955
|
-
resource_created_at: String(modified),
|
|
956
|
-
embedded_html: Object.fromEntries(types.map((type) => [type, `<div class="embedded">Embedded HTML for ${type}</div>`])),
|
|
957
|
-
fitted_html: Object.fromEntries(types.map((type) => [type, `<div class="fitted">Fitted HTML for ${type}</div>`])),
|
|
958
|
-
isolated_html: `<div class="isolated">Isolated HTML</div>`,
|
|
959
|
-
atom_html: `<span class="atom">Atom HTML</span>`,
|
|
960
|
-
head_html: null,
|
|
961
|
-
icon_html: "<svg>test icon</svg>"
|
|
962
|
-
}]);
|
|
963
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
964
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
965
|
-
type: "instance-error",
|
|
966
|
-
error: {
|
|
967
|
-
message: "test error",
|
|
968
|
-
status: 500,
|
|
969
|
-
additionalErrors: []
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
await batch.done();
|
|
973
|
-
let [rawErrorEntry] = await adapter.execute("SELECT * FROM boxel_index WHERE generation = 2 AND type = 'instance' AND has_error = TRUE ORDER BY url COLLATE \"POSIX\"", { coerceTypes });
|
|
974
|
-
let { indexed_at: _remove, diagnostics, ...errorEntry } = rawErrorEntry;
|
|
975
|
-
assert.ok(errorEntry.error_doc, "row has an error_doc");
|
|
976
|
-
let { diagnostics: errorDocDiagnostics, ...errorDocWithoutDiagnostics } = errorEntry.error_doc;
|
|
977
|
-
errorEntry.error_doc = errorDocWithoutDiagnostics;
|
|
978
|
-
assert.deepEqual(errorEntry, {
|
|
979
|
-
url: `${testRealmURL}1.json`,
|
|
980
|
-
file_alias: `${testRealmURL}1`,
|
|
981
|
-
generation: 2,
|
|
982
|
-
host_shell_generation: null,
|
|
983
|
-
source_content_hash: null,
|
|
984
|
-
relationship_deps: null,
|
|
985
|
-
realm_url: testRealmURL,
|
|
986
|
-
type: "instance",
|
|
987
|
-
has_error: true,
|
|
988
|
-
pristine_doc: resource,
|
|
989
|
-
error_doc: {
|
|
990
|
-
message: "test error",
|
|
991
|
-
status: 500,
|
|
992
|
-
id: `${testRealmURL}1.json`,
|
|
993
|
-
additionalErrors: []
|
|
994
|
-
},
|
|
995
|
-
search_doc: { name: "Mango" },
|
|
996
|
-
display_names: [`Person`],
|
|
997
|
-
deps: [`${testRealmURL}person`],
|
|
998
|
-
last_known_good_deps: [`${testRealmURL}person`],
|
|
999
|
-
types,
|
|
1000
|
-
last_modified: String(modified),
|
|
1001
|
-
resource_created_at: String(modified),
|
|
1002
|
-
is_deleted: null,
|
|
1003
|
-
icon_html: "<svg>test icon</svg>"
|
|
1004
|
-
}, "the error entry includes last known good state of instance");
|
|
1005
|
-
assert.ok(diagnostics, "diagnostics populated on error row");
|
|
1006
|
-
assert.strictEqual(typeof diagnostics, "object", "diagnostics is an object");
|
|
1007
|
-
assert.deepEqual(errorDocDiagnostics, diagnostics, "error_doc.diagnostics mirrors diagnostics");
|
|
1008
|
-
});
|
|
1009
|
-
(0, import_qunit.test)("error entry keeps freshly-stamped synthetic search keys over the last-known-good doc", async function(assert) {
|
|
1010
|
-
let timestamp = Date.now();
|
|
1011
|
-
await setupIndex(adapter, [{
|
|
1012
|
-
realm_url: testRealmURL,
|
|
1013
|
-
current_generation: 1
|
|
1014
|
-
}], [{
|
|
1015
|
-
url: `${testRealmURL}1.json`,
|
|
1016
|
-
generation: 1,
|
|
1017
|
-
realm_url: testRealmURL,
|
|
1018
|
-
type: "file",
|
|
1019
|
-
search_doc: {
|
|
1020
|
-
name: "1.json",
|
|
1021
|
-
extra: "keep-me"
|
|
1022
|
-
},
|
|
1023
|
-
last_modified: String(timestamp),
|
|
1024
|
-
resource_created_at: String(timestamp)
|
|
1025
|
-
}]);
|
|
1026
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1027
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1028
|
-
type: "file-error",
|
|
1029
|
-
error: {
|
|
1030
|
-
message: "dep in error",
|
|
1031
|
-
status: 500,
|
|
1032
|
-
additionalErrors: []
|
|
1033
|
-
},
|
|
1034
|
-
searchData: {
|
|
1035
|
-
name: "1.json",
|
|
1036
|
-
_isCardInstanceFile: true,
|
|
1037
|
-
_title: "1.json"
|
|
1038
|
-
}
|
|
1039
|
-
});
|
|
1040
|
-
await batch.done();
|
|
1041
|
-
let [row] = await adapter.execute("SELECT search_doc FROM boxel_index WHERE generation = 2 AND type = 'file' AND has_error = TRUE", { coerceTypes });
|
|
1042
|
-
assert.deepEqual(row.search_doc, {
|
|
1043
|
-
name: "1.json",
|
|
1044
|
-
extra: "keep-me",
|
|
1045
|
-
_isCardInstanceFile: true,
|
|
1046
|
-
_title: "1.json"
|
|
1047
|
-
}, "error row merges freshly-stamped synthetic keys onto the last-known-good doc");
|
|
1048
|
-
});
|
|
1049
|
-
(0, import_qunit.test)("strips jsonb-illegal code points from error_doc and diagnostics on write", async function(assert) {
|
|
1050
|
-
await setupIndex(adapter, [{
|
|
1051
|
-
realm_url: testRealmURL,
|
|
1052
|
-
current_generation: 1
|
|
1053
|
-
}], []);
|
|
1054
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1055
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1056
|
-
type: "instance-error",
|
|
1057
|
-
error: {
|
|
1058
|
-
message: "Unexpected token \0\ud800 JFIF is not valid JSON",
|
|
1059
|
-
status: 500,
|
|
1060
|
-
additionalErrors: [{
|
|
1061
|
-
message: "nested \0 binary",
|
|
1062
|
-
status: 500,
|
|
1063
|
-
additionalErrors: []
|
|
1064
|
-
}]
|
|
1065
|
-
},
|
|
1066
|
-
diagnostics: { renderStage: "load\0links" }
|
|
1067
|
-
});
|
|
1068
|
-
await batch.done();
|
|
1069
|
-
let [row] = await adapter.execute("SELECT * FROM boxel_index WHERE has_error = TRUE AND generation = 2", { coerceTypes });
|
|
1070
|
-
assert.ok(row?.error_doc, "error row persisted despite binary in message");
|
|
1071
|
-
let nul = String.fromCharCode(0);
|
|
1072
|
-
let hasIllegalCodePoint = (s) => s.includes(nul) || /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/.test(s);
|
|
1073
|
-
assert.notOk(hasIllegalCodePoint(row.error_doc.message), "illegal code points stripped from the error message");
|
|
1074
|
-
assert.true(row.error_doc.message.includes("JFIF"), "the readable remainder of the message is preserved");
|
|
1075
|
-
assert.notOk(hasIllegalCodePoint(row.error_doc.additionalErrors[0].message), "illegal code points stripped from nested additionalErrors too");
|
|
1076
|
-
assert.strictEqual(row.diagnostics.renderStage, "load�links", "illegal code points stripped from diagnostics strings too");
|
|
1077
|
-
});
|
|
1078
|
-
(0, import_qunit.test)("copies the render's host-shell generation onto the row", async function(assert) {
|
|
1079
|
-
await setupIndex(adapter, [{
|
|
1080
|
-
realm_url: testRealmURL,
|
|
1081
|
-
current_generation: 1
|
|
1082
|
-
}], []);
|
|
1083
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1084
|
-
await batch.updateEntry(new URL(`${testRealmURL}rendered.json`), {
|
|
1085
|
-
type: "file",
|
|
1086
|
-
lastModified: 1,
|
|
1087
|
-
resourceCreatedAt: 1,
|
|
1088
|
-
deps: /* @__PURE__ */ new Set(),
|
|
1089
|
-
searchData: { name: "rendered" },
|
|
1090
|
-
diagnostics: { warmedHostShellGeneration: 9 }
|
|
1091
|
-
});
|
|
1092
|
-
await batch.updateEntry(new URL(`${testRealmURL}failed.json`), {
|
|
1093
|
-
type: "instance-error",
|
|
1094
|
-
error: {
|
|
1095
|
-
message: "boom",
|
|
1096
|
-
status: 500,
|
|
1097
|
-
additionalErrors: []
|
|
1098
|
-
},
|
|
1099
|
-
diagnostics: { warmedHostShellGeneration: 9 }
|
|
1100
|
-
});
|
|
1101
|
-
await batch.updateEntry(new URL(`${testRealmURL}unstamped.json`), {
|
|
1102
|
-
type: "file",
|
|
1103
|
-
lastModified: 1,
|
|
1104
|
-
resourceCreatedAt: 1,
|
|
1105
|
-
deps: /* @__PURE__ */ new Set(),
|
|
1106
|
-
searchData: { name: "unstamped" },
|
|
1107
|
-
diagnostics: { hostShellHash: "b778fe76" }
|
|
1108
|
-
});
|
|
1109
|
-
await batch.done();
|
|
1110
|
-
let rows = await adapter.execute(`SELECT url, host_shell_generation FROM boxel_index
|
|
1111
|
-
WHERE realm_url = $1 ORDER BY url`, { bind: [testRealmURL] });
|
|
1112
|
-
assert.deepEqual(rows.map((r) => [r.url.replace(testRealmURL, ""), r.host_shell_generation]), [
|
|
1113
|
-
["failed.json", 9],
|
|
1114
|
-
["rendered.json", 9],
|
|
1115
|
-
["unstamped.json", null]
|
|
1116
|
-
], "the number reaches the success row and the error row, and absence stays null");
|
|
1117
|
-
});
|
|
1118
|
-
(0, import_qunit.module)("an error row over a published row", function(hooks) {
|
|
1119
|
-
const PUBLISHED_GENERATION = 3;
|
|
1120
|
-
const RENDER_GENERATION = 9;
|
|
1121
|
-
hooks.beforeEach(async function() {
|
|
1122
|
-
await setupIndex(adapter, [{
|
|
1123
|
-
realm_url: testRealmURL,
|
|
1124
|
-
current_generation: 1
|
|
1125
|
-
}], [{
|
|
1126
|
-
url: `${testRealmURL}1.json`,
|
|
1127
|
-
generation: 1,
|
|
1128
|
-
realm_url: testRealmURL,
|
|
1129
|
-
host_shell_generation: PUBLISHED_GENERATION,
|
|
1130
|
-
pristine_doc: {
|
|
1131
|
-
id: `${testRealmURL}1.json`,
|
|
1132
|
-
type: "card",
|
|
1133
|
-
attributes: { name: "Mango" },
|
|
1134
|
-
meta: { adoptsFrom: {
|
|
1135
|
-
module: rri(`./person`),
|
|
1136
|
-
name: "Person"
|
|
1137
|
-
} }
|
|
1138
|
-
},
|
|
1139
|
-
search_doc: { name: "Mango" }
|
|
1140
|
-
}]);
|
|
1141
|
-
});
|
|
1142
|
-
let generationOnRow = async () => {
|
|
1143
|
-
let [row] = await adapter.execute(`SELECT host_shell_generation FROM boxel_index WHERE url = $1`, { bind: [`${testRealmURL}1.json`] });
|
|
1144
|
-
return row.host_shell_generation;
|
|
1145
|
-
};
|
|
1146
|
-
(0, import_qunit.test)("a published error takes the render's generation", async function(assert) {
|
|
1147
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1148
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1149
|
-
type: "instance-error",
|
|
1150
|
-
error: {
|
|
1151
|
-
message: "boom",
|
|
1152
|
-
status: 500,
|
|
1153
|
-
additionalErrors: []
|
|
1154
|
-
},
|
|
1155
|
-
diagnostics: { warmedHostShellGeneration: RENDER_GENERATION }
|
|
1156
|
-
});
|
|
1157
|
-
await batch.done();
|
|
1158
|
-
assert.strictEqual(await generationOnRow(), RENDER_GENERATION);
|
|
1159
|
-
});
|
|
1160
|
-
(0, import_qunit.test)("a withheld failure keeps the published generation", async function(assert) {
|
|
1161
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1162
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1163
|
-
type: "instance-error",
|
|
1164
|
-
error: {
|
|
1165
|
-
message: "boom",
|
|
1166
|
-
status: 500,
|
|
1167
|
-
additionalErrors: []
|
|
1168
|
-
},
|
|
1169
|
-
diagnostics: {
|
|
1170
|
-
warmedHostShellGeneration: RENDER_GENERATION,
|
|
1171
|
-
staleShellFailure: ["instance"]
|
|
1172
|
-
}
|
|
1173
|
-
});
|
|
1174
|
-
await batch.done();
|
|
1175
|
-
let [row] = await adapter.execute(`SELECT host_shell_generation, has_error FROM boxel_index WHERE url = $1`, {
|
|
1176
|
-
bind: [`${testRealmURL}1.json`],
|
|
1177
|
-
coerceTypes: { has_error: "BOOLEAN" }
|
|
1178
|
-
});
|
|
1179
|
-
assert.false(row.has_error, "the failure was withheld");
|
|
1180
|
-
assert.strictEqual(row.host_shell_generation, PUBLISHED_GENERATION, "the row still serves the published render, so it keeps its generation");
|
|
1181
|
-
});
|
|
1182
|
-
});
|
|
1183
|
-
(0, import_qunit.test)("error entry does not include last known good state when not available", async function(assert) {
|
|
1184
|
-
await setupIndex(adapter, [{
|
|
1185
|
-
realm_url: testRealmURL,
|
|
1186
|
-
current_generation: 1
|
|
1187
|
-
}], []);
|
|
1188
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1189
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1190
|
-
type: "instance-error",
|
|
1191
|
-
error: {
|
|
1192
|
-
message: "test error",
|
|
1193
|
-
status: 500,
|
|
1194
|
-
additionalErrors: []
|
|
1195
|
-
}
|
|
1196
|
-
});
|
|
1197
|
-
await batch.done();
|
|
1198
|
-
let [rawErrorEntry] = await adapter.execute("SELECT * FROM boxel_index WHERE generation = 2 AND type = 'instance' AND has_error = TRUE ORDER BY url COLLATE \"POSIX\"", { coerceTypes });
|
|
1199
|
-
let { indexed_at: _remove, diagnostics, ...errorEntry } = rawErrorEntry;
|
|
1200
|
-
assert.ok(errorEntry.error_doc, "row has an error_doc");
|
|
1201
|
-
let { diagnostics: errorDocDiagnostics, ...errorDocWithoutDiagnostics } = errorEntry.error_doc;
|
|
1202
|
-
errorEntry.error_doc = errorDocWithoutDiagnostics;
|
|
1203
|
-
assert.deepEqual(errorEntry, {
|
|
1204
|
-
url: `${testRealmURL}1.json`,
|
|
1205
|
-
file_alias: `${testRealmURL}1`,
|
|
1206
|
-
generation: 2,
|
|
1207
|
-
host_shell_generation: null,
|
|
1208
|
-
source_content_hash: null,
|
|
1209
|
-
relationship_deps: null,
|
|
1210
|
-
realm_url: testRealmURL,
|
|
1211
|
-
type: "instance",
|
|
1212
|
-
has_error: true,
|
|
1213
|
-
pristine_doc: null,
|
|
1214
|
-
error_doc: {
|
|
1215
|
-
message: "test error",
|
|
1216
|
-
status: 500,
|
|
1217
|
-
id: `${testRealmURL}1.json`,
|
|
1218
|
-
additionalErrors: []
|
|
1219
|
-
},
|
|
1220
|
-
search_doc: null,
|
|
1221
|
-
display_names: null,
|
|
1222
|
-
deps: [],
|
|
1223
|
-
last_known_good_deps: null,
|
|
1224
|
-
types: null,
|
|
1225
|
-
last_modified: null,
|
|
1226
|
-
resource_created_at: null,
|
|
1227
|
-
is_deleted: false,
|
|
1228
|
-
icon_html: null
|
|
1229
|
-
}, "the error entry does not include last known good state of instance");
|
|
1230
|
-
assert.ok(diagnostics, "diagnostics populated on error row");
|
|
1231
|
-
assert.strictEqual(typeof diagnostics, "object", "diagnostics is an object");
|
|
1232
|
-
assert.deepEqual(errorDocDiagnostics, diagnostics, "error_doc.diagnostics mirrors diagnostics");
|
|
1233
|
-
});
|
|
1234
|
-
(0, import_qunit.test)("normalizes error doc id and deps", async function(assert) {
|
|
1235
|
-
await setupIndex(adapter, [{
|
|
1236
|
-
realm_url: testRealmURL,
|
|
1237
|
-
current_generation: 1
|
|
1238
|
-
}], []);
|
|
1239
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1240
|
-
await batch.updateEntry(new URL(`${testRealmURL}nested/1.json`), {
|
|
1241
|
-
type: "instance-error",
|
|
1242
|
-
error: {
|
|
1243
|
-
id: null,
|
|
1244
|
-
message: "test error",
|
|
1245
|
-
status: 404,
|
|
1246
|
-
deps: ["../headless-skill-set", `${testRealmURL}other-card`],
|
|
1247
|
-
additionalErrors: null
|
|
1248
|
-
}
|
|
1249
|
-
});
|
|
1250
|
-
await batch.done();
|
|
1251
|
-
let [{ error_doc: errorDoc, deps }] = await adapter.execute("SELECT error_doc, deps FROM boxel_index WHERE generation = 2 AND type = 'instance' AND has_error = TRUE ORDER BY url COLLATE \"POSIX\"", { coerceTypes });
|
|
1252
|
-
assert.strictEqual(errorDoc?.id, `${testRealmURL}nested/1.json`, "id defaults to entry url");
|
|
1253
|
-
assert.deepEqual(errorDoc?.deps, [`${testRealmURL}headless-skill-set`, `${testRealmURL}other-card`], "error doc deps are canonicalized");
|
|
1254
|
-
assert.deepEqual(deps, [`${testRealmURL}headless-skill-set`, `${testRealmURL}other-card`], "entry deps include normalized error deps");
|
|
1255
|
-
});
|
|
1256
|
-
(0, import_qunit.test)("error_doc within budget is persisted unchanged", async function(assert) {
|
|
1257
|
-
await setupIndex(adapter, [{
|
|
1258
|
-
realm_url: testRealmURL,
|
|
1259
|
-
current_generation: 1
|
|
1260
|
-
}], []);
|
|
1261
|
-
let inputError = {
|
|
1262
|
-
message: "small parent error",
|
|
1263
|
-
status: 500,
|
|
1264
|
-
title: "Render error",
|
|
1265
|
-
stack: "Error: small\n at thing (/x.js:1:1)",
|
|
1266
|
-
additionalErrors: [{
|
|
1267
|
-
status: 500,
|
|
1268
|
-
message: "inner err",
|
|
1269
|
-
stack: "Error: inner\n at inner (/y.js:1:1)",
|
|
1270
|
-
additionalErrors: [{
|
|
1271
|
-
status: 500,
|
|
1272
|
-
message: "inner inner — preserved end-to-end",
|
|
1273
|
-
additionalErrors: null
|
|
1274
|
-
}]
|
|
1275
|
-
}]
|
|
1276
|
-
};
|
|
1277
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1278
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1279
|
-
type: "instance-error",
|
|
1280
|
-
error: { ...inputError }
|
|
1281
|
-
});
|
|
1282
|
-
await batch.done();
|
|
1283
|
-
let [{ error_doc: errorDoc }] = await adapter.execute("SELECT error_doc FROM boxel_index WHERE has_error = TRUE AND type = 'instance'", { coerceTypes });
|
|
1284
|
-
assert.ok(errorDoc, "error_doc was persisted");
|
|
1285
|
-
assert.strictEqual(errorDoc.message, inputError.message, "message preserved verbatim");
|
|
1286
|
-
assert.strictEqual(errorDoc.stack, inputError.stack, "top-level stack preserved verbatim");
|
|
1287
|
-
assert.strictEqual(errorDoc.additionalErrors.length, 1, "additionalErrors length preserved");
|
|
1288
|
-
let kept = errorDoc.additionalErrors[0];
|
|
1289
|
-
assert.strictEqual(kept.message, "inner err", "inherited message preserved");
|
|
1290
|
-
assert.ok(Array.isArray(kept.additionalErrors), "nested additionalErrors retained for in-budget docs");
|
|
1291
|
-
assert.strictEqual(kept.additionalErrors[0].message, "inner inner — preserved end-to-end", "second-level nesting preserved verbatim");
|
|
1292
|
-
});
|
|
1293
|
-
(0, import_qunit.test)("oversized error_doc is shed progressively until it fits", async function(assert) {
|
|
1294
|
-
await setupIndex(adapter, [{
|
|
1295
|
-
realm_url: testRealmURL,
|
|
1296
|
-
current_generation: 1
|
|
1297
|
-
}], []);
|
|
1298
|
-
let entries = Array.from({ length: 50 }, (_, i) => ({
|
|
1299
|
-
status: 500,
|
|
1300
|
-
message: `dep err ${i}`,
|
|
1301
|
-
stack: "x".repeat(1024 * 1024),
|
|
1302
|
-
additionalErrors: [{
|
|
1303
|
-
status: 500,
|
|
1304
|
-
message: "inherited nested",
|
|
1305
|
-
additionalErrors: null
|
|
1306
|
-
}]
|
|
1307
|
-
}));
|
|
1308
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1309
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1310
|
-
type: "instance-error",
|
|
1311
|
-
error: {
|
|
1312
|
-
message: "parent",
|
|
1313
|
-
status: 500,
|
|
1314
|
-
stack: "short",
|
|
1315
|
-
additionalErrors: entries
|
|
1316
|
-
}
|
|
1317
|
-
});
|
|
1318
|
-
await batch.done();
|
|
1319
|
-
let [{ error_doc: errorDoc }] = await adapter.execute("SELECT error_doc FROM boxel_index WHERE has_error = TRUE AND type = 'instance'", { coerceTypes });
|
|
1320
|
-
assert.ok(errorDoc, "error_doc was persisted");
|
|
1321
|
-
assert.ok(JSON.stringify(errorDoc).length <= 8 * 1024 * 1024, "persisted error_doc fits the 8 MiB budget");
|
|
1322
|
-
assert.strictEqual(errorDoc.message, "parent", "top-level message untouched");
|
|
1323
|
-
assert.strictEqual(errorDoc.additionalErrors.length, 50, "entry count preserved (no late-stage capping)");
|
|
1324
|
-
assert.strictEqual(errorDoc.additionalErrors[0].message, "dep err 0", "per-entry message untouched");
|
|
1325
|
-
assert.ok(Array.isArray(errorDoc.additionalErrors[0].additionalErrors), "nested additionalErrors retained (step 4 did not run)");
|
|
1326
|
-
assert.ok(errorDoc.additionalErrors[0].stack.length < 1024 * 1024, "per-entry stacks were trimmed (step 1 ran)");
|
|
1327
|
-
});
|
|
1328
|
-
(0, import_qunit.test)("can get an error doc", async function(assert) {
|
|
1329
|
-
await setupIndex(adapter, [{
|
|
1330
|
-
url: `${testRealmURL}1.json`,
|
|
1331
|
-
generation: 1,
|
|
1332
|
-
realm_url: testRealmURL,
|
|
1333
|
-
type: "instance",
|
|
1334
|
-
has_error: true,
|
|
1335
|
-
error_doc: {
|
|
1336
|
-
message: "test error",
|
|
1337
|
-
status: 500,
|
|
1338
|
-
id: `${testRealmURL}1.json`,
|
|
1339
|
-
additionalErrors: []
|
|
1340
|
-
}
|
|
1341
|
-
}]);
|
|
1342
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`));
|
|
1343
|
-
if (entry?.type === "instance-error") {
|
|
1344
|
-
assert.ok(entry.lastModified, "lastModified exists");
|
|
1345
|
-
entry.lastModified = null;
|
|
1346
|
-
assert.deepEqual(entry, {
|
|
1347
|
-
type: "instance-error",
|
|
1348
|
-
error: {
|
|
1349
|
-
message: "test error",
|
|
1350
|
-
status: 500,
|
|
1351
|
-
id: `${testRealmURL}1.json`,
|
|
1352
|
-
additionalErrors: []
|
|
1353
|
-
},
|
|
1354
|
-
canonicalURL: `${testRealmURL}1.json`,
|
|
1355
|
-
generation: 1,
|
|
1356
|
-
realmURL: testRealmURL,
|
|
1357
|
-
instance: null,
|
|
1358
|
-
lastModified: null,
|
|
1359
|
-
resourceCreatedAt: null,
|
|
1360
|
-
isolatedHtml: null,
|
|
1361
|
-
embeddedHtml: null,
|
|
1362
|
-
fittedHtml: null,
|
|
1363
|
-
atomHtml: null,
|
|
1364
|
-
headHtml: null,
|
|
1365
|
-
markdown: null,
|
|
1366
|
-
searchDoc: null,
|
|
1367
|
-
types: null,
|
|
1368
|
-
indexedAt: null,
|
|
1369
|
-
deps: null,
|
|
1370
|
-
captures: null,
|
|
1371
|
-
sourceContentHash: null
|
|
1372
|
-
});
|
|
1373
|
-
} else assert.ok(false, `expected index entry to not be a card document`);
|
|
1374
|
-
});
|
|
1375
|
-
(0, import_qunit.test)("allows multiple index entries for the same url with different types", async function(assert) {
|
|
1376
|
-
let timestamp = Date.now();
|
|
1377
|
-
let resource = {
|
|
1378
|
-
id: `${testRealmURL}1`,
|
|
1379
|
-
type: "card",
|
|
1380
|
-
attributes: { name: "Mango" },
|
|
1381
|
-
meta: { adoptsFrom: {
|
|
1382
|
-
module: rri(`./person`),
|
|
1383
|
-
name: "Person"
|
|
1384
|
-
} }
|
|
1385
|
-
};
|
|
1386
|
-
await setupIndex(adapter, [{
|
|
1387
|
-
url: `${testRealmURL}1.json`,
|
|
1388
|
-
type: "instance",
|
|
1389
|
-
pristine_doc: resource,
|
|
1390
|
-
last_modified: String(timestamp),
|
|
1391
|
-
resource_created_at: String(timestamp)
|
|
1392
|
-
}, {
|
|
1393
|
-
url: `${testRealmURL}1.json`,
|
|
1394
|
-
type: "file",
|
|
1395
|
-
search_doc: { name: "1.json" }
|
|
1396
|
-
}]);
|
|
1397
|
-
let rows = await adapter.execute("SELECT url, type FROM boxel_index WHERE url = $1 ORDER BY type COLLATE \"POSIX\"", { bind: [`${testRealmURL}1.json`] });
|
|
1398
|
-
assert.deepEqual(rows, [{
|
|
1399
|
-
url: `${testRealmURL}1.json`,
|
|
1400
|
-
type: "file"
|
|
1401
|
-
}, {
|
|
1402
|
-
url: `${testRealmURL}1.json`,
|
|
1403
|
-
type: "instance"
|
|
1404
|
-
}], "index rows include file and instance entries");
|
|
1405
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`));
|
|
1406
|
-
assert.strictEqual(entry?.type, "instance", "instance entry is accessible");
|
|
1407
|
-
});
|
|
1408
|
-
(0, import_qunit.test)("can get \"production\" index entry", async function(assert) {
|
|
1409
|
-
let originalModified = Date.now();
|
|
1410
|
-
let originalResource = {
|
|
1411
|
-
id: `${testRealmURL}1`,
|
|
1412
|
-
type: "card",
|
|
1413
|
-
attributes: { name: "Mango" },
|
|
1414
|
-
meta: { adoptsFrom: {
|
|
1415
|
-
module: rri(`./person`),
|
|
1416
|
-
name: "Person"
|
|
1417
|
-
} }
|
|
1418
|
-
};
|
|
1419
|
-
await setupIndex(adapter, [{
|
|
1420
|
-
realm_url: testRealmURL,
|
|
1421
|
-
current_generation: 1
|
|
1422
|
-
}], [{
|
|
1423
|
-
url: `${testRealmURL}1.json`,
|
|
1424
|
-
generation: 1,
|
|
1425
|
-
realm_url: testRealmURL,
|
|
1426
|
-
pristine_doc: originalResource,
|
|
1427
|
-
last_modified: String(originalModified),
|
|
1428
|
-
resource_created_at: String(originalModified)
|
|
1429
|
-
}]);
|
|
1430
|
-
let resource = {
|
|
1431
|
-
id: testRRI("1.json"),
|
|
1432
|
-
type: "card",
|
|
1433
|
-
attributes: { name: "Van Gogh" },
|
|
1434
|
-
meta: { adoptsFrom: {
|
|
1435
|
-
module: rri(`./person`),
|
|
1436
|
-
name: "Person"
|
|
1437
|
-
} }
|
|
1438
|
-
};
|
|
1439
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1440
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
1441
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1442
|
-
type: "instance",
|
|
1443
|
-
resource,
|
|
1444
|
-
lastModified: Date.now(),
|
|
1445
|
-
resourceCreatedAt: Date.now(),
|
|
1446
|
-
searchData: { name: "Van Gogh" },
|
|
1447
|
-
deps: /* @__PURE__ */ new Set(),
|
|
1448
|
-
displayNames: [],
|
|
1449
|
-
types: []
|
|
1450
|
-
});
|
|
1451
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`));
|
|
1452
|
-
if (entry?.type === "instance") assert.deepEqual(entry, {
|
|
1453
|
-
type: "instance",
|
|
1454
|
-
generation: 1,
|
|
1455
|
-
realmURL: testRealmURL,
|
|
1456
|
-
canonicalURL: `${testRealmURL}1.json`,
|
|
1457
|
-
instance: {
|
|
1458
|
-
id: testRRI("1"),
|
|
1459
|
-
type: "card",
|
|
1460
|
-
attributes: { name: "Mango" },
|
|
1461
|
-
meta: { adoptsFrom: {
|
|
1462
|
-
module: rri(`./person`),
|
|
1463
|
-
name: "Person"
|
|
1464
|
-
} }
|
|
1465
|
-
},
|
|
1466
|
-
lastModified: originalModified,
|
|
1467
|
-
resourceCreatedAt: originalModified,
|
|
1468
|
-
searchDoc: null,
|
|
1469
|
-
deps: null,
|
|
1470
|
-
types: null,
|
|
1471
|
-
indexedAt: null,
|
|
1472
|
-
isolatedHtml: null,
|
|
1473
|
-
atomHtml: null,
|
|
1474
|
-
embeddedHtml: null,
|
|
1475
|
-
fittedHtml: null,
|
|
1476
|
-
headHtml: null,
|
|
1477
|
-
markdown: null,
|
|
1478
|
-
captures: null,
|
|
1479
|
-
sourceContentHash: null,
|
|
1480
|
-
renderError: null
|
|
1481
|
-
});
|
|
1482
|
-
else assert.ok(false, `expected index entry to not be an error document`);
|
|
1483
|
-
});
|
|
1484
|
-
(0, import_qunit.test)("can get work in progress card", async function(assert) {
|
|
1485
|
-
await setupIndex(adapter, [{
|
|
1486
|
-
realm_url: testRealmURL,
|
|
1487
|
-
current_generation: 1
|
|
1488
|
-
}], [{
|
|
1489
|
-
url: `${testRealmURL}1.json`,
|
|
1490
|
-
generation: 1,
|
|
1491
|
-
realm_url: testRealmURL,
|
|
1492
|
-
pristine_doc: {
|
|
1493
|
-
attributes: { name: "Mango" },
|
|
1494
|
-
meta: { adoptsFrom: {
|
|
1495
|
-
module: rri(`./person`),
|
|
1496
|
-
name: "Person"
|
|
1497
|
-
} }
|
|
1498
|
-
}
|
|
1499
|
-
}]);
|
|
1500
|
-
let resource = {
|
|
1501
|
-
id: testRRI("1.json"),
|
|
1502
|
-
type: "card",
|
|
1503
|
-
attributes: { name: "Van Gogh" },
|
|
1504
|
-
meta: { adoptsFrom: {
|
|
1505
|
-
module: rri(`./person`),
|
|
1506
|
-
name: "Person"
|
|
1507
|
-
} }
|
|
1508
|
-
};
|
|
1509
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1510
|
-
let now = Date.now();
|
|
1511
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
1512
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1513
|
-
type: "instance",
|
|
1514
|
-
resource,
|
|
1515
|
-
lastModified: now,
|
|
1516
|
-
resourceCreatedAt: now,
|
|
1517
|
-
searchData: { name: "Van Gogh" },
|
|
1518
|
-
deps: /* @__PURE__ */ new Set(),
|
|
1519
|
-
displayNames: [],
|
|
1520
|
-
types: [],
|
|
1521
|
-
sourceContentHash: "abc123"
|
|
1522
|
-
});
|
|
1523
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`), { pendingStagingId: batch.stagingId });
|
|
1524
|
-
if (entry?.type === "instance") {
|
|
1525
|
-
assert.ok(entry?.indexedAt, "the indexed_at field was set");
|
|
1526
|
-
delete entry?.indexedAt;
|
|
1527
|
-
assert.deepEqual(entry, {
|
|
1528
|
-
type: "instance",
|
|
1529
|
-
generation: 2,
|
|
1530
|
-
realmURL: testRealmURL,
|
|
1531
|
-
canonicalURL: `${testRealmURL}1.json`,
|
|
1532
|
-
instance: {
|
|
1533
|
-
id: testRRI("1.json"),
|
|
1534
|
-
type: "card",
|
|
1535
|
-
attributes: { name: "Van Gogh" },
|
|
1536
|
-
meta: { adoptsFrom: {
|
|
1537
|
-
module: rri(`./person`),
|
|
1538
|
-
name: "Person"
|
|
1539
|
-
} }
|
|
1540
|
-
},
|
|
1541
|
-
lastModified: now,
|
|
1542
|
-
resourceCreatedAt: now,
|
|
1543
|
-
searchDoc: { name: "Van Gogh" },
|
|
1544
|
-
deps: [],
|
|
1545
|
-
types: [],
|
|
1546
|
-
isolatedHtml: null,
|
|
1547
|
-
embeddedHtml: null,
|
|
1548
|
-
fittedHtml: null,
|
|
1549
|
-
atomHtml: null,
|
|
1550
|
-
headHtml: null,
|
|
1551
|
-
markdown: null,
|
|
1552
|
-
captures: null,
|
|
1553
|
-
sourceContentHash: "abc123",
|
|
1554
|
-
renderError: null
|
|
1555
|
-
});
|
|
1556
|
-
} else assert.ok(false, `expected index entry to not be an error document`);
|
|
1557
|
-
});
|
|
1558
|
-
(0, import_qunit.test)("persists and reads back markdown for an instance entry", async function(assert) {
|
|
1559
|
-
await setupIndex(adapter, [{
|
|
1560
|
-
realm_url: testRealmURL,
|
|
1561
|
-
current_generation: 1
|
|
1562
|
-
}], []);
|
|
1563
|
-
let resource = {
|
|
1564
|
-
id: testRRI("1.json"),
|
|
1565
|
-
type: "card",
|
|
1566
|
-
attributes: { name: "Van Gogh" },
|
|
1567
|
-
meta: { adoptsFrom: {
|
|
1568
|
-
module: rri(`./person`),
|
|
1569
|
-
name: "Person"
|
|
1570
|
-
} }
|
|
1571
|
-
};
|
|
1572
|
-
let now = Date.now();
|
|
1573
|
-
let markdown = "# Van Gogh\n\n- email: vangogh@example.com";
|
|
1574
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1575
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
1576
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
1577
|
-
type: "instance",
|
|
1578
|
-
resource,
|
|
1579
|
-
lastModified: now,
|
|
1580
|
-
resourceCreatedAt: now,
|
|
1581
|
-
searchData: { name: "Van Gogh" },
|
|
1582
|
-
deps: /* @__PURE__ */ new Set(),
|
|
1583
|
-
displayNames: [],
|
|
1584
|
-
types: [],
|
|
1585
|
-
markdown
|
|
1586
|
-
});
|
|
1587
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`), { pendingStagingId: batch.stagingId });
|
|
1588
|
-
if (entry?.type === "instance") assert.strictEqual(entry.markdown, markdown, "markdown round-trips through updateEntry + getInstance");
|
|
1589
|
-
else assert.ok(false, `expected index entry to be an instance (got ${entry?.type})`);
|
|
1590
|
-
});
|
|
1591
|
-
(0, import_qunit.test)("returns undefined when getting a deleted card", async function(assert) {
|
|
1592
|
-
await setupIndex(adapter, [{
|
|
1593
|
-
realm_url: testRealmURL,
|
|
1594
|
-
current_generation: 1
|
|
1595
|
-
}], [{
|
|
1596
|
-
url: `${testRealmURL}1.json`,
|
|
1597
|
-
generation: 1,
|
|
1598
|
-
realm_url: testRealmURL,
|
|
1599
|
-
is_deleted: true
|
|
1600
|
-
}]);
|
|
1601
|
-
let entry = await indexQueryEngine.getInstance(new URL(`${testRealmURL}1`));
|
|
1602
|
-
assert.strictEqual(entry, void 0, "deleted entries return undefined");
|
|
1603
|
-
});
|
|
1604
|
-
(0, import_qunit.test)("can perform invalidations for an instance with deps more than a thousand", async function(assert) {
|
|
1605
|
-
let indexRows = [];
|
|
1606
|
-
for (let i = 1; i <= 1002; i++) indexRows.push({
|
|
1607
|
-
url: `${testRealmURL}${i}.json`,
|
|
1608
|
-
generation: 1,
|
|
1609
|
-
realm_url: testRealmURL,
|
|
1610
|
-
deps: [...i <= 1 ? [] : [`${testRealmURL}1.json`]]
|
|
1611
|
-
});
|
|
1612
|
-
indexRows.sort((a, b) => a.url.localeCompare(b.url));
|
|
1613
|
-
await setupIndex(adapter, [{
|
|
1614
|
-
realm_url: testRealmURL,
|
|
1615
|
-
current_generation: 1
|
|
1616
|
-
}], indexRows);
|
|
1617
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1618
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
1619
|
-
let invalidations = batch.invalidations;
|
|
1620
|
-
assert.ok(invalidations.length > 1e3, "Can invalidate more than 1000");
|
|
1621
|
-
assert.deepEqual(invalidations.sort(), indexRows.map((r) => r.url));
|
|
1622
|
-
let invalidatedEntries = await adapter.execute("SELECT url, realm_url, is_deleted FROM boxel_index_pending WHERE generation = 2 ORDER BY url COLLATE \"POSIX\"", { coerceTypes: { is_deleted: "BOOLEAN" } });
|
|
1623
|
-
assert.deepEqual(invalidatedEntries, indexRows.map((indexRow) => ({
|
|
1624
|
-
url: indexRow.url,
|
|
1625
|
-
realm_url: indexRow.realm_url,
|
|
1626
|
-
is_deleted: true
|
|
1627
|
-
})), "the \"work-in-progress\" version of the index entries have been marked as deleted");
|
|
1628
|
-
let generations = await adapter.execute("select realm_url, current_generation from realm_generations ORDER BY realm_url COLLATE \"POSIX\"");
|
|
1629
|
-
assert.deepEqual(generations, [{
|
|
1630
|
-
realm_url: `${testRealmURL}`,
|
|
1631
|
-
current_generation: 1
|
|
1632
|
-
}], "the \"production\" realm generations are correct");
|
|
1633
|
-
});
|
|
1634
|
-
(0, import_qunit.test)("update realm meta when indexing is done", async function(assert) {
|
|
1635
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
1636
|
-
let personTypes = internalKeysFor(virtualNetwork, {
|
|
1637
|
-
module: rri("./person"),
|
|
1638
|
-
name: "Person"
|
|
1639
|
-
}, baseCardRef);
|
|
1640
|
-
let fancyPersonTypes = internalKeysFor(virtualNetwork, {
|
|
1641
|
-
module: rri("./fancy-person"),
|
|
1642
|
-
name: "FancyPerson"
|
|
1643
|
-
}, {
|
|
1644
|
-
module: rri("./person"),
|
|
1645
|
-
name: "Person"
|
|
1646
|
-
}, baseCardRef);
|
|
1647
|
-
let petTypes = internalKeysFor(virtualNetwork, {
|
|
1648
|
-
module: rri("./pet"),
|
|
1649
|
-
name: "Pet"
|
|
1650
|
-
}, {
|
|
1651
|
-
module: rri("./card-api"),
|
|
1652
|
-
name: "CardDef"
|
|
1653
|
-
}, baseCardRef);
|
|
1654
|
-
await setupIndex(adapter, [{
|
|
1655
|
-
realm_url: testRealmURL,
|
|
1656
|
-
current_generation: 1
|
|
1657
|
-
}], [{
|
|
1658
|
-
url: `${testRealmURL}1.json`,
|
|
1659
|
-
generation: 1,
|
|
1660
|
-
realm_url: testRealmURL,
|
|
1661
|
-
pristine_doc: {
|
|
1662
|
-
id: `${testRealmURL}1`,
|
|
1663
|
-
type: "card",
|
|
1664
|
-
attributes: { name: "Mango" },
|
|
1665
|
-
meta: { adoptsFrom: {
|
|
1666
|
-
module: rri(`./person`),
|
|
1667
|
-
name: "Person"
|
|
1668
|
-
} }
|
|
1669
|
-
},
|
|
1670
|
-
search_doc: { name: "Mango" },
|
|
1671
|
-
display_names: [`Person`],
|
|
1672
|
-
deps: [`${testRealmURL}person`],
|
|
1673
|
-
types: personTypes,
|
|
1674
|
-
icon_html: iconHTML
|
|
1675
|
-
}]);
|
|
1676
|
-
let resource2 = makeCardResource("2", "Van Gogh", {
|
|
1677
|
-
module: rri("./fancy-person"),
|
|
1678
|
-
name: "FancyPerson"
|
|
1679
|
-
});
|
|
1680
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1681
|
-
await batch.invalidate([new URL(`${testRealmURL}2.json`)]);
|
|
1682
|
-
let timestamp = Date.now();
|
|
1683
|
-
await batch.updateEntry(new URL(`${testRealmURL}2.json`), {
|
|
1684
|
-
type: "instance",
|
|
1685
|
-
resource: resource2,
|
|
1686
|
-
lastModified: timestamp,
|
|
1687
|
-
resourceCreatedAt: timestamp,
|
|
1688
|
-
searchData: { name: "Van Gogh" },
|
|
1689
|
-
deps: new Set([`${testRealmURL}fancy-person`]),
|
|
1690
|
-
displayNames: [
|
|
1691
|
-
"Fancy Person",
|
|
1692
|
-
"Person",
|
|
1693
|
-
"Card"
|
|
1694
|
-
],
|
|
1695
|
-
types: fancyPersonTypes,
|
|
1696
|
-
iconHTML
|
|
1697
|
-
});
|
|
1698
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
1699
|
-
assert.strictEqual(realmMeta.rows.length, 0, "correct length of query result before indexing is done");
|
|
1700
|
-
await batch.done();
|
|
1701
|
-
realmMeta = await fetchRealmMeta(adapter);
|
|
1702
|
-
assert.strictEqual(realmMeta.rows.length, 1, "correct length of query result after indexing is done");
|
|
1703
|
-
let value = realmMeta.value;
|
|
1704
|
-
assert.strictEqual(value.length, 2, "correct length of card type summary after indexing is done");
|
|
1705
|
-
assert.deepEqual(value, [makeCardTypeSummary(`${testRealmURL}fancy-person/FancyPerson`, "Fancy Person", iconHTML, 1), makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1)], "correct card type summary after indexing is done");
|
|
1706
|
-
batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1707
|
-
let resource3 = makeCardResource("3", "Van Gogh2", {
|
|
1708
|
-
module: rri("./fancy-person"),
|
|
1709
|
-
name: "FancyPerson"
|
|
1710
|
-
});
|
|
1711
|
-
await batch.invalidate([new URL(`${testRealmURL}3.json`)]);
|
|
1712
|
-
timestamp = Date.now();
|
|
1713
|
-
await batch.updateEntry(new URL(`${testRealmURL}3.json`), {
|
|
1714
|
-
type: "instance",
|
|
1715
|
-
resource: resource3,
|
|
1716
|
-
lastModified: timestamp,
|
|
1717
|
-
resourceCreatedAt: timestamp,
|
|
1718
|
-
searchData: { name: "Van Gogh2" },
|
|
1719
|
-
deps: new Set([`${testRealmURL}fancy-person`]),
|
|
1720
|
-
displayNames: [
|
|
1721
|
-
"Fancy Person",
|
|
1722
|
-
"Person",
|
|
1723
|
-
"Card"
|
|
1724
|
-
],
|
|
1725
|
-
types: fancyPersonTypes,
|
|
1726
|
-
iconHTML
|
|
1727
|
-
});
|
|
1728
|
-
let resource4 = makeCardResource("4", "Mango", {
|
|
1729
|
-
module: rri("./pet"),
|
|
1730
|
-
name: "Pet"
|
|
1731
|
-
});
|
|
1732
|
-
await batch.invalidate([new URL(`${testRealmURL}4.json`)]);
|
|
1733
|
-
timestamp = Date.now();
|
|
1734
|
-
await batch.updateEntry(new URL(`${testRealmURL}4.json`), {
|
|
1735
|
-
type: "instance",
|
|
1736
|
-
resource: resource4,
|
|
1737
|
-
lastModified: timestamp,
|
|
1738
|
-
resourceCreatedAt: timestamp,
|
|
1739
|
-
searchData: { name: "Mango" },
|
|
1740
|
-
deps: new Set([`${testRealmURL}pet`]),
|
|
1741
|
-
displayNames: ["Pet", "Card"],
|
|
1742
|
-
types: petTypes,
|
|
1743
|
-
iconHTML
|
|
1744
|
-
});
|
|
1745
|
-
await batch.done();
|
|
1746
|
-
realmMeta = await fetchRealmMeta(adapter);
|
|
1747
|
-
assert.strictEqual(realmMeta.rows.length, 1, "correct length of query result after indexing is done");
|
|
1748
|
-
value = realmMeta.value;
|
|
1749
|
-
assert.strictEqual(value.length, 3, "correct length of card type summary after indexing is done");
|
|
1750
|
-
assert.deepEqual(value, [
|
|
1751
|
-
makeCardTypeSummary(`${testRealmURL}fancy-person/FancyPerson`, "Fancy Person", iconHTML, 2),
|
|
1752
|
-
makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1),
|
|
1753
|
-
makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)
|
|
1754
|
-
], "correct card type summary after indexing is done");
|
|
1755
|
-
});
|
|
1756
|
-
(0, import_qunit.test)("a failure inside the swap rolls back every statement the swap made", async function(assert) {
|
|
1757
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
1758
|
-
let personRef = {
|
|
1759
|
-
module: rri("./person"),
|
|
1760
|
-
name: "Person"
|
|
1761
|
-
};
|
|
1762
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
1763
|
-
await setupIndex(adapter);
|
|
1764
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1765
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
1766
|
-
await writeInstance(batch, {
|
|
1767
|
-
id: "1",
|
|
1768
|
-
name: "Mango",
|
|
1769
|
-
adoptsFrom: personRef,
|
|
1770
|
-
displayNames: ["Person", "Card"],
|
|
1771
|
-
types: personTypes,
|
|
1772
|
-
iconHTML
|
|
1773
|
-
});
|
|
1774
|
-
await adapter.execute(`CREATE TRIGGER index_writer_test_fail_swap
|
|
1775
|
-
BEFORE INSERT ON realm_type_generations
|
|
1776
|
-
BEGIN
|
|
1777
|
-
SELECT RAISE(ABORT, 'injected index swap failure');
|
|
1778
|
-
END`);
|
|
1779
|
-
try {
|
|
1780
|
-
await assert.rejects(batch.done(), "the swap fails at its last statement");
|
|
1781
|
-
} finally {
|
|
1782
|
-
await adapter.execute("DROP TRIGGER IF EXISTS index_writer_test_fail_swap");
|
|
1783
|
-
}
|
|
1784
|
-
let promoted = await adapter.execute(`SELECT url FROM boxel_index WHERE realm_url = $1`, { bind: [testRealmURL] });
|
|
1785
|
-
assert.deepEqual(promoted, [], "no row reached boxel_index");
|
|
1786
|
-
let generations = await adapter.execute(`SELECT current_generation FROM realm_generations WHERE realm_url = $1`, { bind: [testRealmURL] });
|
|
1787
|
-
assert.deepEqual(generations, [{ current_generation: 1 }], "the realm generation did not advance");
|
|
1788
|
-
assert.deepEqual((await fetchRealmMetaRows(adapter)).length, 0, "no realm_meta row was written");
|
|
1789
|
-
await adapter.execute("BEGIN");
|
|
1790
|
-
await adapter.execute("COMMIT");
|
|
1791
|
-
assert.ok(true, "a new transaction starts cleanly after the rollback");
|
|
1792
|
-
});
|
|
1793
|
-
(0, import_qunit.test)("update realm meta carries forward the types a pass did not touch", async function(assert) {
|
|
1794
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
1795
|
-
let personRef = {
|
|
1796
|
-
module: rri("./person"),
|
|
1797
|
-
name: "Person"
|
|
1798
|
-
};
|
|
1799
|
-
let petRef = {
|
|
1800
|
-
module: rri("./pet"),
|
|
1801
|
-
name: "Pet"
|
|
1802
|
-
};
|
|
1803
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
1804
|
-
let petTypes = internalKeysFor(virtualNetwork, petRef, baseCardRef);
|
|
1805
|
-
await setupIndex(adapter, [{
|
|
1806
|
-
realm_url: testRealmURL,
|
|
1807
|
-
current_generation: 1
|
|
1808
|
-
}], [{
|
|
1809
|
-
url: `${testRealmURL}1.json`,
|
|
1810
|
-
generation: 1,
|
|
1811
|
-
realm_url: testRealmURL,
|
|
1812
|
-
type: "instance",
|
|
1813
|
-
pristine_doc: makeCardResource("1", "Mango", personRef),
|
|
1814
|
-
search_doc: { name: "Mango" },
|
|
1815
|
-
display_names: ["Person"],
|
|
1816
|
-
deps: [`${testRealmURL}person`],
|
|
1817
|
-
types: personTypes,
|
|
1818
|
-
icon_html: iconHTML
|
|
1819
|
-
}]);
|
|
1820
|
-
await plantRealmMeta(adapter, 1, {
|
|
1821
|
-
instances: [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 42)],
|
|
1822
|
-
files: [makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 7)]
|
|
1823
|
-
});
|
|
1824
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1825
|
-
await batch.invalidate([new URL(`${testRealmURL}2.json`)]);
|
|
1826
|
-
await writeInstance(batch, {
|
|
1827
|
-
id: "2",
|
|
1828
|
-
name: "Ringo",
|
|
1829
|
-
adoptsFrom: petRef,
|
|
1830
|
-
displayNames: ["Pet", "Card"],
|
|
1831
|
-
types: petTypes,
|
|
1832
|
-
iconHTML
|
|
1833
|
-
});
|
|
1834
|
-
await batch.done();
|
|
1835
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
1836
|
-
assert.deepEqual(realmMeta.value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 42), makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)], "Person keeps the entry the previous generation held and Pet is recomputed, both in display-name order");
|
|
1837
|
-
assert.deepEqual(realmMeta.files, [makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 7)], "the file arm carries forward too, on a pass that touched no file rows");
|
|
1838
|
-
});
|
|
1839
|
-
(0, import_qunit.test)("update realm meta rebuilds when the previous generation predates the partitioned shape", async function(assert) {
|
|
1840
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
1841
|
-
let personRef = {
|
|
1842
|
-
module: rri("./person"),
|
|
1843
|
-
name: "Person"
|
|
1844
|
-
};
|
|
1845
|
-
let petRef = {
|
|
1846
|
-
module: rri("./pet"),
|
|
1847
|
-
name: "Pet"
|
|
1848
|
-
};
|
|
1849
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
1850
|
-
let petTypes = internalKeysFor(virtualNetwork, petRef, baseCardRef);
|
|
1851
|
-
let markdownTypes = internalKeysFor(virtualNetwork, {
|
|
1852
|
-
module: rri("./markdown-file-def"),
|
|
1853
|
-
name: "MarkdownDef"
|
|
1854
|
-
}, {
|
|
1855
|
-
module: rri("./card-api"),
|
|
1856
|
-
name: "FileDef"
|
|
1857
|
-
});
|
|
1858
|
-
await setupIndex(adapter, [{
|
|
1859
|
-
realm_url: testRealmURL,
|
|
1860
|
-
current_generation: 1
|
|
1861
|
-
}], [{
|
|
1862
|
-
url: `${testRealmURL}1.json`,
|
|
1863
|
-
generation: 1,
|
|
1864
|
-
realm_url: testRealmURL,
|
|
1865
|
-
type: "instance",
|
|
1866
|
-
pristine_doc: makeCardResource("1", "Mango", personRef),
|
|
1867
|
-
search_doc: { name: "Mango" },
|
|
1868
|
-
display_names: ["Person"],
|
|
1869
|
-
deps: [`${testRealmURL}person`],
|
|
1870
|
-
types: personTypes,
|
|
1871
|
-
icon_html: iconHTML
|
|
1872
|
-
}, {
|
|
1873
|
-
url: `${testRealmURL}notes/a.md`,
|
|
1874
|
-
generation: 1,
|
|
1875
|
-
realm_url: testRealmURL,
|
|
1876
|
-
type: "file",
|
|
1877
|
-
search_doc: {
|
|
1878
|
-
name: "a.md",
|
|
1879
|
-
url: `${testRealmURL}notes/a.md`
|
|
1880
|
-
},
|
|
1881
|
-
display_names: ["Markdown", "File"],
|
|
1882
|
-
types: markdownTypes,
|
|
1883
|
-
icon_html: iconHTML
|
|
1884
|
-
}]);
|
|
1885
|
-
await plantRealmMeta(adapter, 1, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 42)]);
|
|
1886
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1887
|
-
await batch.invalidate([new URL(`${testRealmURL}2.json`)]);
|
|
1888
|
-
await writeInstance(batch, {
|
|
1889
|
-
id: "2",
|
|
1890
|
-
name: "Ringo",
|
|
1891
|
-
adoptsFrom: petRef,
|
|
1892
|
-
displayNames: ["Pet", "Card"],
|
|
1893
|
-
types: petTypes,
|
|
1894
|
-
iconHTML
|
|
1895
|
-
});
|
|
1896
|
-
await batch.done();
|
|
1897
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
1898
|
-
assert.deepEqual(realmMeta.files, [makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 1)], "the file arm the legacy shape never had is rebuilt rather than published empty");
|
|
1899
|
-
assert.deepEqual(realmMeta.value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1), makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)], "the planted count is recomputed rather than carried, so the pass rebuilt");
|
|
1900
|
-
});
|
|
1901
|
-
(0, import_qunit.test)("update realm meta publishes the same value whether or not the pass could scope its rollup", async function(assert) {
|
|
1902
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
1903
|
-
let personRef = {
|
|
1904
|
-
module: rri("./person"),
|
|
1905
|
-
name: "Person"
|
|
1906
|
-
};
|
|
1907
|
-
let petRef = {
|
|
1908
|
-
module: rri("./pet"),
|
|
1909
|
-
name: "Pet"
|
|
1910
|
-
};
|
|
1911
|
-
let personaRef = {
|
|
1912
|
-
module: rri("./persona"),
|
|
1913
|
-
name: "Persona"
|
|
1914
|
-
};
|
|
1915
|
-
let namelessRef = {
|
|
1916
|
-
module: rri("./nameless"),
|
|
1917
|
-
name: "Nameless"
|
|
1918
|
-
};
|
|
1919
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
1920
|
-
let petTypes = internalKeysFor(virtualNetwork, petRef, baseCardRef);
|
|
1921
|
-
let personaTypes = internalKeysFor(virtualNetwork, personaRef, baseCardRef);
|
|
1922
|
-
let namelessTypes = internalKeysFor(virtualNetwork, namelessRef, baseCardRef);
|
|
1923
|
-
let markdownTypes = internalKeysFor(virtualNetwork, {
|
|
1924
|
-
module: rri("./markdown-file-def"),
|
|
1925
|
-
name: "MarkdownDef"
|
|
1926
|
-
}, {
|
|
1927
|
-
module: rri("./card-api"),
|
|
1928
|
-
name: "FileDef"
|
|
1929
|
-
});
|
|
1930
|
-
await setupIndex(adapter, [{
|
|
1931
|
-
realm_url: testRealmURL,
|
|
1932
|
-
current_generation: 1
|
|
1933
|
-
}], [
|
|
1934
|
-
{
|
|
1935
|
-
url: `${testRealmURL}1.json`,
|
|
1936
|
-
generation: 1,
|
|
1937
|
-
realm_url: testRealmURL,
|
|
1938
|
-
type: "instance",
|
|
1939
|
-
pristine_doc: makeCardResource("1", "Mango", personRef),
|
|
1940
|
-
search_doc: { name: "Mango" },
|
|
1941
|
-
display_names: ["Person"],
|
|
1942
|
-
deps: [`${testRealmURL}person`],
|
|
1943
|
-
types: personTypes,
|
|
1944
|
-
icon_html: iconHTML
|
|
1945
|
-
},
|
|
1946
|
-
{
|
|
1947
|
-
url: `${testRealmURL}3.json`,
|
|
1948
|
-
generation: 1,
|
|
1949
|
-
realm_url: testRealmURL,
|
|
1950
|
-
type: "instance",
|
|
1951
|
-
pristine_doc: makeCardResource("3", "Vincent", personaRef),
|
|
1952
|
-
search_doc: { name: "Vincent" },
|
|
1953
|
-
display_names: ["Person"],
|
|
1954
|
-
deps: [`${testRealmURL}persona`],
|
|
1955
|
-
types: personaTypes,
|
|
1956
|
-
icon_html: iconHTML
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
url: `${testRealmURL}4.json`,
|
|
1960
|
-
generation: 1,
|
|
1961
|
-
realm_url: testRealmURL,
|
|
1962
|
-
type: "instance",
|
|
1963
|
-
pristine_doc: makeCardResource("4", "Anon", namelessRef),
|
|
1964
|
-
search_doc: { name: "Anon" },
|
|
1965
|
-
display_names: [],
|
|
1966
|
-
deps: [`${testRealmURL}nameless`],
|
|
1967
|
-
types: namelessTypes,
|
|
1968
|
-
icon_html: iconHTML
|
|
1969
|
-
},
|
|
1970
|
-
{
|
|
1971
|
-
url: `${testRealmURL}notes/a.md`,
|
|
1972
|
-
generation: 1,
|
|
1973
|
-
realm_url: testRealmURL,
|
|
1974
|
-
type: "file",
|
|
1975
|
-
search_doc: {
|
|
1976
|
-
name: "a.md",
|
|
1977
|
-
url: `${testRealmURL}notes/a.md`
|
|
1978
|
-
},
|
|
1979
|
-
display_names: ["Markdown", "File"],
|
|
1980
|
-
types: markdownTypes,
|
|
1981
|
-
icon_html: iconHTML
|
|
1982
|
-
}
|
|
1983
|
-
]);
|
|
1984
|
-
await plantRealmMeta(adapter, 1, {
|
|
1985
|
-
instances: [
|
|
1986
|
-
makeCardTypeSummary(`${testRealmURL}persona/Persona`, "Person", iconHTML, 1),
|
|
1987
|
-
makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1),
|
|
1988
|
-
makeCardTypeSummary(`${testRealmURL}nameless/Nameless`, null, iconHTML, 1)
|
|
1989
|
-
],
|
|
1990
|
-
files: [makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 1)]
|
|
1991
|
-
});
|
|
1992
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
1993
|
-
await batch.invalidate([new URL(`${testRealmURL}2.json`)]);
|
|
1994
|
-
await writeInstance(batch, {
|
|
1995
|
-
id: "2",
|
|
1996
|
-
name: "Ringo",
|
|
1997
|
-
adoptsFrom: petRef,
|
|
1998
|
-
displayNames: ["Pet", "Card"],
|
|
1999
|
-
types: petTypes,
|
|
2000
|
-
iconHTML
|
|
2001
|
-
});
|
|
2002
|
-
await batch.done();
|
|
2003
|
-
let scoped = await fetchRealmMeta(adapter);
|
|
2004
|
-
batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2005
|
-
await writeInstance(batch, {
|
|
2006
|
-
id: "2",
|
|
2007
|
-
name: "Ringo",
|
|
2008
|
-
adoptsFrom: petRef,
|
|
2009
|
-
displayNames: ["Pet", "Card"],
|
|
2010
|
-
types: petTypes,
|
|
2011
|
-
iconHTML
|
|
2012
|
-
});
|
|
2013
|
-
await batch.done();
|
|
2014
|
-
let rebuilt = await fetchRealmMeta(adapter);
|
|
2015
|
-
assert.deepEqual(scoped.value, rebuilt.value, "the instance summaries are identical");
|
|
2016
|
-
assert.deepEqual(scoped.files, rebuilt.files, "the file summaries are identical");
|
|
2017
|
-
assert.deepEqual(Object.fromEntries(scoped.value.map((s) => [s.code_ref, s.total])), {
|
|
2018
|
-
[`${testRealmURL}person/Person`]: 1,
|
|
2019
|
-
[`${testRealmURL}persona/Persona`]: 1,
|
|
2020
|
-
[`${testRealmURL}nameless/Nameless`]: 1,
|
|
2021
|
-
[`${testRealmURL}pet/Pet`]: 1
|
|
2022
|
-
}, "and both describe the realm as it now stands");
|
|
2023
|
-
assert.strictEqual(scoped.value[scoped.value.length - 1].code_ref, `${testRealmURL}nameless/Nameless`, "the unlabelled type sorts last under NULLS LAST");
|
|
2024
|
-
});
|
|
2025
|
-
(0, import_qunit.test)("update realm meta drops a type whose last instance the pass deleted", async function(assert) {
|
|
2026
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
2027
|
-
let personRef = {
|
|
2028
|
-
module: rri("./person"),
|
|
2029
|
-
name: "Person"
|
|
2030
|
-
};
|
|
2031
|
-
let petRef = {
|
|
2032
|
-
module: rri("./pet"),
|
|
2033
|
-
name: "Pet"
|
|
2034
|
-
};
|
|
2035
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
2036
|
-
let petTypes = internalKeysFor(virtualNetwork, petRef, baseCardRef);
|
|
2037
|
-
await setupIndex(adapter, [{
|
|
2038
|
-
realm_url: testRealmURL,
|
|
2039
|
-
current_generation: 1
|
|
2040
|
-
}], [{
|
|
2041
|
-
url: `${testRealmURL}1.json`,
|
|
2042
|
-
generation: 1,
|
|
2043
|
-
realm_url: testRealmURL,
|
|
2044
|
-
type: "instance",
|
|
2045
|
-
pristine_doc: makeCardResource("1", "Mango", personRef),
|
|
2046
|
-
search_doc: { name: "Mango" },
|
|
2047
|
-
display_names: ["Person"],
|
|
2048
|
-
deps: [`${testRealmURL}person`],
|
|
2049
|
-
types: personTypes,
|
|
2050
|
-
icon_html: iconHTML
|
|
2051
|
-
}, {
|
|
2052
|
-
url: `${testRealmURL}2.json`,
|
|
2053
|
-
generation: 1,
|
|
2054
|
-
realm_url: testRealmURL,
|
|
2055
|
-
type: "instance",
|
|
2056
|
-
pristine_doc: makeCardResource("2", "Ringo", petRef),
|
|
2057
|
-
search_doc: { name: "Ringo" },
|
|
2058
|
-
display_names: ["Pet"],
|
|
2059
|
-
deps: [`${testRealmURL}pet`],
|
|
2060
|
-
types: petTypes,
|
|
2061
|
-
icon_html: iconHTML
|
|
2062
|
-
}]);
|
|
2063
|
-
await plantRealmMeta(adapter, 1, {
|
|
2064
|
-
instances: [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 42), makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)],
|
|
2065
|
-
files: []
|
|
2066
|
-
});
|
|
2067
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2068
|
-
await batch.invalidate([new URL(`${testRealmURL}2.json`)]);
|
|
2069
|
-
await batch.done();
|
|
2070
|
-
assert.deepEqual((await fetchRealmMeta(adapter)).value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 42)], "the emptied type is dropped from the carried arm while the untouched one keeps the entry it had");
|
|
2071
|
-
});
|
|
2072
|
-
(0, import_qunit.test)("update realm meta moves a count when a card changes what it adopts from", async function(assert) {
|
|
2073
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
2074
|
-
let personRef = {
|
|
2075
|
-
module: rri("./person"),
|
|
2076
|
-
name: "Person"
|
|
2077
|
-
};
|
|
2078
|
-
let petRef = {
|
|
2079
|
-
module: rri("./pet"),
|
|
2080
|
-
name: "Pet"
|
|
2081
|
-
};
|
|
2082
|
-
let dogRef = {
|
|
2083
|
-
module: rri("./dog"),
|
|
2084
|
-
name: "Dog"
|
|
2085
|
-
};
|
|
2086
|
-
let personTypes = internalKeysFor(virtualNetwork, personRef, baseCardRef);
|
|
2087
|
-
let petTypes = internalKeysFor(virtualNetwork, petRef, baseCardRef);
|
|
2088
|
-
let dogTypes = internalKeysFor(virtualNetwork, dogRef, baseCardRef);
|
|
2089
|
-
await setupIndex(adapter, [{
|
|
2090
|
-
realm_url: testRealmURL,
|
|
2091
|
-
current_generation: 1
|
|
2092
|
-
}], [{
|
|
2093
|
-
url: `${testRealmURL}1.json`,
|
|
2094
|
-
generation: 1,
|
|
2095
|
-
realm_url: testRealmURL,
|
|
2096
|
-
type: "instance",
|
|
2097
|
-
pristine_doc: makeCardResource("1", "Mango", personRef),
|
|
2098
|
-
search_doc: { name: "Mango" },
|
|
2099
|
-
display_names: ["Person"],
|
|
2100
|
-
deps: [`${testRealmURL}person`],
|
|
2101
|
-
types: personTypes,
|
|
2102
|
-
icon_html: iconHTML
|
|
2103
|
-
}, {
|
|
2104
|
-
url: `${testRealmURL}3.json`,
|
|
2105
|
-
generation: 1,
|
|
2106
|
-
realm_url: testRealmURL,
|
|
2107
|
-
type: "instance",
|
|
2108
|
-
pristine_doc: makeCardResource("3", "Rex", dogRef),
|
|
2109
|
-
search_doc: { name: "Rex" },
|
|
2110
|
-
display_names: ["Dog"],
|
|
2111
|
-
deps: [`${testRealmURL}dog`],
|
|
2112
|
-
types: dogTypes,
|
|
2113
|
-
icon_html: iconHTML
|
|
2114
|
-
}]);
|
|
2115
|
-
await plantRealmMeta(adapter, 1, {
|
|
2116
|
-
instances: [makeCardTypeSummary(`${testRealmURL}dog/Dog`, "Dog", iconHTML, 42), makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1)],
|
|
2117
|
-
files: []
|
|
2118
|
-
});
|
|
2119
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2120
|
-
await batch.invalidate([new URL(`${testRealmURL}1.json`)]);
|
|
2121
|
-
await writeInstance(batch, {
|
|
2122
|
-
id: "1",
|
|
2123
|
-
name: "Mango",
|
|
2124
|
-
adoptsFrom: petRef,
|
|
2125
|
-
displayNames: ["Pet", "Card"],
|
|
2126
|
-
types: petTypes,
|
|
2127
|
-
iconHTML
|
|
2128
|
-
});
|
|
2129
|
-
await batch.done();
|
|
2130
|
-
assert.deepEqual((await fetchRealmMeta(adapter)).value, [makeCardTypeSummary(`${testRealmURL}dog/Dog`, "Dog", iconHTML, 42), makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)], "the count moved onto the new type, the type it left is gone, and the type the pass never named was carried");
|
|
2131
|
-
});
|
|
2132
|
-
(0, import_qunit.test)("update realm meta partitions file rows into the files array", async function(assert) {
|
|
2133
|
-
let iconHTML = "<svg>file icon</svg>";
|
|
2134
|
-
let baseFileTypes = internalKeysFor(virtualNetwork, {
|
|
2135
|
-
module: rri("./card-api"),
|
|
2136
|
-
name: "FileDef"
|
|
2137
|
-
});
|
|
2138
|
-
let markdownTypes = internalKeysFor(virtualNetwork, {
|
|
2139
|
-
module: rri("./markdown-file-def"),
|
|
2140
|
-
name: "MarkdownDef"
|
|
2141
|
-
}, {
|
|
2142
|
-
module: rri("./card-api"),
|
|
2143
|
-
name: "FileDef"
|
|
2144
|
-
});
|
|
2145
|
-
await setupIndex(adapter, [{
|
|
2146
|
-
realm_url: testRealmURL,
|
|
2147
|
-
current_generation: 1
|
|
2148
|
-
}], [
|
|
2149
|
-
{
|
|
2150
|
-
url: `${testRealmURL}1.json`,
|
|
2151
|
-
generation: 1,
|
|
2152
|
-
realm_url: testRealmURL,
|
|
2153
|
-
type: "instance",
|
|
2154
|
-
pristine_doc: makeCardResource("1", "Mango", {
|
|
2155
|
-
module: rri("./person"),
|
|
2156
|
-
name: "Person"
|
|
2157
|
-
}),
|
|
2158
|
-
search_doc: { name: "Mango" },
|
|
2159
|
-
display_names: ["Person"],
|
|
2160
|
-
deps: [`${testRealmURL}person`],
|
|
2161
|
-
types: internalKeysFor(virtualNetwork, {
|
|
2162
|
-
module: rri("./person"),
|
|
2163
|
-
name: "Person"
|
|
2164
|
-
}, baseCardRef),
|
|
2165
|
-
icon_html: iconHTML
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
url: `${testRealmURL}notes/a.md`,
|
|
2169
|
-
generation: 1,
|
|
2170
|
-
realm_url: testRealmURL,
|
|
2171
|
-
type: "file",
|
|
2172
|
-
search_doc: {
|
|
2173
|
-
name: "a.md",
|
|
2174
|
-
url: `${testRealmURL}notes/a.md`
|
|
2175
|
-
},
|
|
2176
|
-
display_names: ["Markdown", "File"],
|
|
2177
|
-
types: markdownTypes,
|
|
2178
|
-
icon_html: iconHTML
|
|
2179
|
-
},
|
|
2180
|
-
{
|
|
2181
|
-
url: `${testRealmURL}notes/b.md`,
|
|
2182
|
-
generation: 1,
|
|
2183
|
-
realm_url: testRealmURL,
|
|
2184
|
-
type: "file",
|
|
2185
|
-
search_doc: {
|
|
2186
|
-
name: "b.md",
|
|
2187
|
-
url: `${testRealmURL}notes/b.md`
|
|
2188
|
-
},
|
|
2189
|
-
display_names: ["Markdown", "File"],
|
|
2190
|
-
types: markdownTypes,
|
|
2191
|
-
icon_html: iconHTML
|
|
2192
|
-
},
|
|
2193
|
-
{
|
|
2194
|
-
url: `${testRealmURL}misc/raw.bin`,
|
|
2195
|
-
generation: 1,
|
|
2196
|
-
realm_url: testRealmURL,
|
|
2197
|
-
type: "file",
|
|
2198
|
-
search_doc: {
|
|
2199
|
-
name: "raw.bin",
|
|
2200
|
-
url: `${testRealmURL}misc/raw.bin`
|
|
2201
|
-
},
|
|
2202
|
-
display_names: ["File"],
|
|
2203
|
-
types: baseFileTypes,
|
|
2204
|
-
icon_html: iconHTML
|
|
2205
|
-
}
|
|
2206
|
-
]);
|
|
2207
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork)).done();
|
|
2208
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
2209
|
-
assert.strictEqual(realmMeta.rows.length, 1, "one realm_meta row was written");
|
|
2210
|
-
assert.deepEqual(realmMeta.value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1)], "instance summaries only reflect CardDef rows");
|
|
2211
|
-
assert.deepEqual(realmMeta.files, [makeCardTypeSummary(`${testRealmURL}card-api/FileDef`, "File", iconHTML, 1), makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 2)], "file summaries collapse duplicates and live in their own arm");
|
|
2212
|
-
});
|
|
2213
|
-
(0, import_qunit.test)("update realm meta collapses rows with the same code_ref but mixed display_names", async function(assert) {
|
|
2214
|
-
let iconHTML = "<svg>icon</svg>";
|
|
2215
|
-
let markdownTypes = internalKeysFor(virtualNetwork, {
|
|
2216
|
-
module: rri("./markdown-file-def"),
|
|
2217
|
-
name: "MarkdownDef"
|
|
2218
|
-
}, {
|
|
2219
|
-
module: rri("./card-api"),
|
|
2220
|
-
name: "FileDef"
|
|
2221
|
-
});
|
|
2222
|
-
await setupIndex(adapter, [{
|
|
2223
|
-
realm_url: testRealmURL,
|
|
2224
|
-
current_generation: 1
|
|
2225
|
-
}], [{
|
|
2226
|
-
url: `${testRealmURL}notes/new.md`,
|
|
2227
|
-
generation: 1,
|
|
2228
|
-
realm_url: testRealmURL,
|
|
2229
|
-
type: "file",
|
|
2230
|
-
search_doc: {
|
|
2231
|
-
name: "new.md",
|
|
2232
|
-
url: `${testRealmURL}notes/new.md`
|
|
2233
|
-
},
|
|
2234
|
-
display_names: ["Markdown", "File"],
|
|
2235
|
-
types: markdownTypes,
|
|
2236
|
-
icon_html: iconHTML
|
|
2237
|
-
}, {
|
|
2238
|
-
url: `${testRealmURL}notes/old.md`,
|
|
2239
|
-
generation: 1,
|
|
2240
|
-
realm_url: testRealmURL,
|
|
2241
|
-
type: "file",
|
|
2242
|
-
search_doc: {
|
|
2243
|
-
name: "old.md",
|
|
2244
|
-
url: `${testRealmURL}notes/old.md`
|
|
2245
|
-
},
|
|
2246
|
-
display_names: [],
|
|
2247
|
-
types: markdownTypes,
|
|
2248
|
-
icon_html: iconHTML
|
|
2249
|
-
}]);
|
|
2250
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork)).done();
|
|
2251
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
2252
|
-
assert.deepEqual(realmMeta.files, [makeCardTypeSummary(`${testRealmURL}markdown-file-def/MarkdownDef`, "Markdown", iconHTML, 2)], "one summary per code_ref, with the populated display_name picked over the empty one");
|
|
2253
|
-
});
|
|
2254
|
-
(0, import_qunit.test)("fetchCardTypeSummary returns the realm_meta row at realm_generations.current_generation", async function(assert) {
|
|
2255
|
-
let iconHTML = "<svg>icon</svg>";
|
|
2256
|
-
let personTypes = internalKeysFor(virtualNetwork, {
|
|
2257
|
-
module: rri("./person"),
|
|
2258
|
-
name: "Person"
|
|
2259
|
-
}, baseCardRef);
|
|
2260
|
-
await setupIndex(adapter, [{
|
|
2261
|
-
realm_url: testRealmURL,
|
|
2262
|
-
current_generation: 1
|
|
2263
|
-
}], [{
|
|
2264
|
-
url: `${testRealmURL}1.json`,
|
|
2265
|
-
generation: 1,
|
|
2266
|
-
realm_url: testRealmURL,
|
|
2267
|
-
type: "instance",
|
|
2268
|
-
pristine_doc: makeCardResource("1", "Mango", {
|
|
2269
|
-
module: rri("./person"),
|
|
2270
|
-
name: "Person"
|
|
2271
|
-
}),
|
|
2272
|
-
search_doc: { name: "Mango" },
|
|
2273
|
-
display_names: ["Person"],
|
|
2274
|
-
deps: [`${testRealmURL}person`],
|
|
2275
|
-
types: personTypes,
|
|
2276
|
-
icon_html: iconHTML
|
|
2277
|
-
}]);
|
|
2278
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork)).done();
|
|
2279
|
-
await adapter.execute(`INSERT INTO realm_meta (realm_url, generation, value, indexed_at)
|
|
2280
|
-
VALUES ($1, $2, $3, $4)`, { bind: [
|
|
2281
|
-
testRealmURL,
|
|
2282
|
-
999,
|
|
2283
|
-
JSON.stringify([{
|
|
2284
|
-
code_ref: `${testRealmURL}stale/Stale`,
|
|
2285
|
-
display_name: "Stale",
|
|
2286
|
-
total: 42,
|
|
2287
|
-
icon_html: iconHTML
|
|
2288
|
-
}]),
|
|
2289
|
-
String(Date.now() - 1e3)
|
|
2290
|
-
] });
|
|
2291
|
-
let summary = await indexQueryEngine.fetchCardTypeSummary(new URL(testRealmURL));
|
|
2292
|
-
assert.deepEqual(summary.instances.map((s) => s.code_ref), [`${testRealmURL}person/Person`], "fetchCardTypeSummary returns the row at realm_generations.current_generation even when a higher-numbered stale row is present");
|
|
2293
|
-
assert.notOk(summary.instances.find((s) => s.display_name === "Stale"), "stale row contents do not leak through");
|
|
2294
|
-
});
|
|
2295
|
-
(0, import_qunit.test)("done() prunes realm_meta rows at any version, including ones higher than the current", async function(assert) {
|
|
2296
|
-
let iconHTML = "<svg>icon</svg>";
|
|
2297
|
-
await setupIndex(adapter, [{
|
|
2298
|
-
realm_url: testRealmURL,
|
|
2299
|
-
current_generation: 0
|
|
2300
|
-
}], []);
|
|
2301
|
-
for (let version of [
|
|
2302
|
-
50,
|
|
2303
|
-
100,
|
|
2304
|
-
200,
|
|
2305
|
-
999
|
|
2306
|
-
]) await adapter.execute(`INSERT INTO realm_meta (realm_url, generation, value, indexed_at)
|
|
2307
|
-
VALUES ($1, $2, $3, $4)`, { bind: [
|
|
2308
|
-
testRealmURL,
|
|
2309
|
-
version,
|
|
2310
|
-
JSON.stringify([{
|
|
2311
|
-
code_ref: `${testRealmURL}stale-${version}/Stale`,
|
|
2312
|
-
display_name: `Stale-${version}`,
|
|
2313
|
-
total: version,
|
|
2314
|
-
icon_html: iconHTML
|
|
2315
|
-
}]),
|
|
2316
|
-
String(Date.now() - version * 1e3)
|
|
2317
|
-
] });
|
|
2318
|
-
let rowsBefore = await adapter.execute(`SELECT generation FROM realm_meta WHERE realm_url = $1 ORDER BY generation`, { bind: [testRealmURL] });
|
|
2319
|
-
assert.deepEqual(rowsBefore.map((r) => r.generation), [
|
|
2320
|
-
50,
|
|
2321
|
-
100,
|
|
2322
|
-
200,
|
|
2323
|
-
999
|
|
2324
|
-
], "stale rows are seeded before the batch runs");
|
|
2325
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork)).done();
|
|
2326
|
-
let rowsAfter = await adapter.execute(`SELECT generation FROM realm_meta WHERE realm_url = $1 ORDER BY generation`, { bind: [testRealmURL] });
|
|
2327
|
-
assert.deepEqual(rowsAfter.map((r) => r.generation), [1], "pruneObsoleteEntries deletes every row that is not the current version, including higher-numbered stale ones");
|
|
2328
|
-
});
|
|
2329
|
-
(0, import_qunit.test)("update realm meta includes error entries with last known good state", async function(assert) {
|
|
2330
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
2331
|
-
let personTypes = internalKeysFor(virtualNetwork, {
|
|
2332
|
-
module: rri("./person"),
|
|
2333
|
-
name: "Person"
|
|
2334
|
-
}, baseCardRef);
|
|
2335
|
-
let personResource = makeCardResource("1", "Mango", {
|
|
2336
|
-
module: rri("./person"),
|
|
2337
|
-
name: "Person"
|
|
2338
|
-
});
|
|
2339
|
-
await setupIndex(adapter, [{
|
|
2340
|
-
realm_url: testRealmURL,
|
|
2341
|
-
current_generation: 1
|
|
2342
|
-
}], [{
|
|
2343
|
-
url: `${testRealmURL}1.json`,
|
|
2344
|
-
generation: 1,
|
|
2345
|
-
realm_url: testRealmURL,
|
|
2346
|
-
pristine_doc: personResource,
|
|
2347
|
-
search_doc: { name: "Mango" },
|
|
2348
|
-
display_names: [`Person`],
|
|
2349
|
-
deps: [`${testRealmURL}person`],
|
|
2350
|
-
types: personTypes,
|
|
2351
|
-
icon_html: iconHTML
|
|
2352
|
-
}]);
|
|
2353
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2354
|
-
await batch.updateEntry(new URL(`${testRealmURL}1.json`), {
|
|
2355
|
-
type: "instance-error",
|
|
2356
|
-
error: {
|
|
2357
|
-
message: "test error",
|
|
2358
|
-
status: 500,
|
|
2359
|
-
additionalErrors: []
|
|
2360
|
-
}
|
|
2361
|
-
});
|
|
2362
|
-
await batch.done();
|
|
2363
|
-
let realmMeta = await fetchRealmMeta(adapter);
|
|
2364
|
-
assert.strictEqual(realmMeta.rows.length, 1, "card type summary includes error entries");
|
|
2365
|
-
let value = realmMeta.value;
|
|
2366
|
-
assert.deepEqual(value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1)], "card type summary uses last known good card type data");
|
|
2367
|
-
});
|
|
2368
|
-
(0, import_qunit.test)("resumes URLs already processed by a previous attempt of the same job", async function(assert) {
|
|
2369
|
-
let url = `${testRealmURL}1.json`;
|
|
2370
|
-
let lastModified = 17e8;
|
|
2371
|
-
await setupIndex(adapter, [{
|
|
2372
|
-
realm_url: testRealmURL,
|
|
2373
|
-
current_generation: 1
|
|
2374
|
-
}], {
|
|
2375
|
-
working: [{
|
|
2376
|
-
url,
|
|
2377
|
-
generation: 1,
|
|
2378
|
-
realm_url: testRealmURL,
|
|
2379
|
-
type: "instance",
|
|
2380
|
-
job_id: 42,
|
|
2381
|
-
staging_id: jobStagingId(42, 1),
|
|
2382
|
-
last_modified: String(lastModified),
|
|
2383
|
-
is_deleted: false,
|
|
2384
|
-
deps: [],
|
|
2385
|
-
types: []
|
|
2386
|
-
}],
|
|
2387
|
-
production: []
|
|
2388
|
-
});
|
|
2389
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2390
|
-
jobId: 42,
|
|
2391
|
-
reservationId: 2,
|
|
2392
|
-
priority: 0,
|
|
2393
|
-
queueWaitMs: null,
|
|
2394
|
-
concurrencyGroup: null,
|
|
2395
|
-
laneFamily: null
|
|
2396
|
-
});
|
|
2397
|
-
assert.strictEqual(batch.resumedRows.size, 1, "resumed rows from prior attempt of same job_id are loaded");
|
|
2398
|
-
assert.strictEqual(batch.resumedRows.get(url), lastModified, "last_modified value is preserved as a number");
|
|
2399
|
-
assert.deepEqual(batch.invalidations, [url], "resumed URLs are pre-seeded into the invalidation set so done() promotes them");
|
|
2400
|
-
});
|
|
2401
|
-
(0, import_qunit.test)("does not resume rows with has_error=true so the retry can re-attempt them", async function(assert) {
|
|
2402
|
-
let url = `${testRealmURL}errored.json`;
|
|
2403
|
-
await setupIndex(adapter, [{
|
|
2404
|
-
realm_url: testRealmURL,
|
|
2405
|
-
current_generation: 1
|
|
2406
|
-
}], {
|
|
2407
|
-
working: [{
|
|
2408
|
-
url,
|
|
2409
|
-
generation: 1,
|
|
2410
|
-
realm_url: testRealmURL,
|
|
2411
|
-
type: "instance",
|
|
2412
|
-
job_id: 42,
|
|
2413
|
-
staging_id: jobStagingId(42, 1),
|
|
2414
|
-
last_modified: "1700000000",
|
|
2415
|
-
is_deleted: false,
|
|
2416
|
-
has_error: true,
|
|
2417
|
-
error_doc: {
|
|
2418
|
-
message: "transient",
|
|
2419
|
-
status: 500,
|
|
2420
|
-
additionalErrors: []
|
|
2421
|
-
},
|
|
2422
|
-
deps: [],
|
|
2423
|
-
types: []
|
|
2424
|
-
}],
|
|
2425
|
-
production: []
|
|
2426
|
-
});
|
|
2427
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2428
|
-
jobId: 42,
|
|
2429
|
-
reservationId: 2,
|
|
2430
|
-
priority: 0,
|
|
2431
|
-
queueWaitMs: null,
|
|
2432
|
-
concurrencyGroup: null,
|
|
2433
|
-
laneFamily: null
|
|
2434
|
-
});
|
|
2435
|
-
assert.strictEqual(batch.resumedRows.size, 0, "errored rows are not resumed — the retry exists to re-attempt them");
|
|
2436
|
-
assert.deepEqual(batch.invalidations, [], "errored URLs are not pre-seeded into the invalidation set");
|
|
2437
|
-
});
|
|
2438
|
-
(0, import_qunit.test)("does not resume rows from a different job", async function(assert) {
|
|
2439
|
-
await setupIndex(adapter, [{
|
|
2440
|
-
realm_url: testRealmURL,
|
|
2441
|
-
current_generation: 1
|
|
2442
|
-
}], {
|
|
2443
|
-
working: [{
|
|
2444
|
-
url: `${testRealmURL}from-other-job.json`,
|
|
2445
|
-
generation: 1,
|
|
2446
|
-
realm_url: testRealmURL,
|
|
2447
|
-
type: "instance",
|
|
2448
|
-
job_id: 99,
|
|
2449
|
-
staging_id: jobStagingId(99, 1),
|
|
2450
|
-
last_modified: "1700000000",
|
|
2451
|
-
is_deleted: false,
|
|
2452
|
-
deps: [],
|
|
2453
|
-
types: []
|
|
2454
|
-
}],
|
|
2455
|
-
production: []
|
|
2456
|
-
});
|
|
2457
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2458
|
-
jobId: 42,
|
|
2459
|
-
reservationId: 2,
|
|
2460
|
-
priority: 0,
|
|
2461
|
-
queueWaitMs: null,
|
|
2462
|
-
concurrencyGroup: null,
|
|
2463
|
-
laneFamily: null
|
|
2464
|
-
});
|
|
2465
|
-
assert.strictEqual(batch.resumedRows.size, 0, "rows tagged with a different job_id are not resumed");
|
|
2466
|
-
});
|
|
2467
|
-
(0, import_qunit.test)("another pass's staged rows are invisible to this pass's discovery, dependency reads and summary, and survive its commit", async function(assert) {
|
|
2468
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
2469
|
-
let personTypes = internalKeysFor(virtualNetwork, {
|
|
2470
|
-
module: rri("./person"),
|
|
2471
|
-
name: "Person"
|
|
2472
|
-
}, baseCardRef);
|
|
2473
|
-
let petTypes = internalKeysFor(virtualNetwork, {
|
|
2474
|
-
module: rri("./pet"),
|
|
2475
|
-
name: "Pet"
|
|
2476
|
-
}, baseCardRef);
|
|
2477
|
-
let hubURL = `${testRealmURL}hub.json`;
|
|
2478
|
-
let doomedURL = `${testRealmURL}doomed.json`;
|
|
2479
|
-
let stagedURL = `${testRealmURL}staged-pet.json`;
|
|
2480
|
-
let committedPerson = (url) => ({
|
|
2481
|
-
url,
|
|
2482
|
-
generation: 1,
|
|
2483
|
-
realm_url: testRealmURL,
|
|
2484
|
-
type: "instance",
|
|
2485
|
-
deps: [`${testRealmURL}person`],
|
|
2486
|
-
types: personTypes,
|
|
2487
|
-
display_names: ["Person"],
|
|
2488
|
-
icon_html: iconHTML
|
|
2489
|
-
});
|
|
2490
|
-
await setupIndex(adapter, [{
|
|
2491
|
-
realm_url: testRealmURL,
|
|
2492
|
-
current_generation: 1
|
|
2493
|
-
}], [committedPerson(hubURL), committedPerson(doomedURL)]);
|
|
2494
|
-
let stageHub = async (stagingBatch, name) => {
|
|
2495
|
-
let now = Date.now();
|
|
2496
|
-
await stagingBatch.updateEntry(new URL(hubURL), {
|
|
2497
|
-
type: "instance",
|
|
2498
|
-
resource: makeCardResource("hub", name, {
|
|
2499
|
-
module: rri("./person"),
|
|
2500
|
-
name: "Person"
|
|
2501
|
-
}),
|
|
2502
|
-
lastModified: now,
|
|
2503
|
-
resourceCreatedAt: now,
|
|
2504
|
-
searchData: { name },
|
|
2505
|
-
deps: new Set([`${testRealmURL}person`]),
|
|
2506
|
-
displayNames: ["Person"],
|
|
2507
|
-
types: personTypes,
|
|
2508
|
-
iconHTML,
|
|
2509
|
-
isolatedHtml: `<p>${name}</p>`
|
|
2510
|
-
});
|
|
2511
|
-
};
|
|
2512
|
-
let peer = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2513
|
-
jobId: 99,
|
|
2514
|
-
reservationId: 1,
|
|
2515
|
-
priority: 0,
|
|
2516
|
-
queueWaitMs: null,
|
|
2517
|
-
concurrencyGroup: null,
|
|
2518
|
-
laneFamily: null
|
|
2519
|
-
});
|
|
2520
|
-
await stageHub(peer, "Peer Hub");
|
|
2521
|
-
await peer.invalidate([new URL(doomedURL)]);
|
|
2522
|
-
let timestamp = Date.now();
|
|
2523
|
-
await peer.updateEntry(new URL(stagedURL), {
|
|
2524
|
-
type: "instance",
|
|
2525
|
-
resource: makeCardResource("staged-pet", "Staged", {
|
|
2526
|
-
module: rri("./pet"),
|
|
2527
|
-
name: "Pet"
|
|
2528
|
-
}),
|
|
2529
|
-
lastModified: timestamp,
|
|
2530
|
-
resourceCreatedAt: timestamp,
|
|
2531
|
-
searchData: { name: "Staged" },
|
|
2532
|
-
deps: new Set([hubURL]),
|
|
2533
|
-
displayNames: ["Pet"],
|
|
2534
|
-
types: petTypes,
|
|
2535
|
-
iconHTML
|
|
2536
|
-
});
|
|
2537
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2538
|
-
await batch.invalidate([new URL(hubURL)]);
|
|
2539
|
-
assert.deepEqual(batch.invalidations, [hubURL], "the fan-out does not follow the peer's staged dependency edge");
|
|
2540
|
-
assert.deepEqual((await batch.getDependencyRows([stagedURL, doomedURL])).map((row) => ({
|
|
2541
|
-
url: row.url,
|
|
2542
|
-
isDeleted: row.isDeleted
|
|
2543
|
-
})), [{
|
|
2544
|
-
url: doomedURL,
|
|
2545
|
-
isDeleted: false
|
|
2546
|
-
}], "dependency reads see the committed rows, not the peer's staged card or its tombstone");
|
|
2547
|
-
assert.deepEqual(await batch.getOrderingDependencyRows([stagedURL]), [], "ordering reads do not see the peer's staged card");
|
|
2548
|
-
await stageHub(batch, "Hub");
|
|
2549
|
-
await batch.done();
|
|
2550
|
-
assert.deepEqual((await fetchRealmMeta(adapter)).value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 2)], "the published summary counts only committed cards: the peer's staged card and deletion are not in it");
|
|
2551
|
-
let production = await adapter.execute(`SELECT url, is_deleted FROM boxel_index WHERE realm_url = $1 ORDER BY url COLLATE "POSIX"`, {
|
|
2552
|
-
bind: [testRealmURL],
|
|
2553
|
-
coerceTypes: { is_deleted: "BOOLEAN" }
|
|
2554
|
-
});
|
|
2555
|
-
assert.deepEqual(production.map((row) => [row.url, Boolean(row.is_deleted)]), [[doomedURL, false], [hubURL, false]], "the commit promotes none of the peer's other rows, and applies none of its deletions");
|
|
2556
|
-
let hubVersions = async () => {
|
|
2557
|
-
let [index] = await adapter.execute(`SELECT search_doc FROM boxel_index WHERE url = $1 AND type = 'instance'`, {
|
|
2558
|
-
bind: [hubURL],
|
|
2559
|
-
coerceTypes: { search_doc: "JSON" }
|
|
2560
|
-
});
|
|
2561
|
-
let [html] = await adapter.execute(`SELECT isolated_html FROM prerendered_html WHERE url = $1 AND type = 'instance'`, { bind: [hubURL] });
|
|
2562
|
-
return {
|
|
2563
|
-
index: index?.search_doc?.name,
|
|
2564
|
-
html: html?.isolated_html
|
|
2565
|
-
};
|
|
2566
|
-
};
|
|
2567
|
-
assert.deepEqual(await hubVersions(), {
|
|
2568
|
-
index: "Hub",
|
|
2569
|
-
html: "<p>Hub</p>"
|
|
2570
|
-
}, "for a URL both passes staged, the commit promotes its own version on both channels, not the peer's");
|
|
2571
|
-
let peerStaged = await adapter.execute(`SELECT url FROM boxel_index_pending WHERE staging_id = $1 ORDER BY url COLLATE "POSIX"`, { bind: [peer.stagingId] });
|
|
2572
|
-
assert.deepEqual(peerStaged.map((row) => row.url), [
|
|
2573
|
-
doomedURL,
|
|
2574
|
-
hubURL,
|
|
2575
|
-
stagedURL
|
|
2576
|
-
], "the commit leaves the peer's staged rows in place");
|
|
2577
|
-
await peer.done();
|
|
2578
|
-
assert.deepEqual((await fetchRealmMeta(adapter)).value, [makeCardTypeSummary(`${testRealmURL}person/Person`, "Person", iconHTML, 1), makeCardTypeSummary(`${testRealmURL}pet/Pet`, "Pet", iconHTML, 1)], "the peer's own commit publishes what it staged");
|
|
2579
|
-
assert.deepEqual(await hubVersions(), {
|
|
2580
|
-
index: "Peer Hub",
|
|
2581
|
-
html: "<p>Peer Hub</p>"
|
|
2582
|
-
}, "the peer's commit promotes the peer's version of the hub");
|
|
2583
|
-
let [doomed] = await adapter.execute(`SELECT is_deleted, types FROM boxel_index WHERE url = $1`, {
|
|
2584
|
-
bind: [doomedURL],
|
|
2585
|
-
coerceTypes: {
|
|
2586
|
-
is_deleted: "BOOLEAN",
|
|
2587
|
-
types: "JSON"
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
assert.true(doomed.is_deleted, "the peer's deletion lands with its commit");
|
|
2591
|
-
assert.deepEqual(doomed.types, personTypes, "the promoted tombstone keeps the rest of the row it hides");
|
|
2592
|
-
});
|
|
2593
|
-
(0, import_qunit.test)("a commit clears ad-hoc staging idle past the abandonment window, and leaves recent staging alone", async function(assert) {
|
|
2594
|
-
let iconHTML = "<svg>test icon</svg>";
|
|
2595
|
-
let types = internalKeysFor(virtualNetwork, {
|
|
2596
|
-
module: rri("./person"),
|
|
2597
|
-
name: "Person"
|
|
2598
|
-
}, baseCardRef);
|
|
2599
|
-
let stageCard = async (id) => {
|
|
2600
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork);
|
|
2601
|
-
await writeInstance(batch, {
|
|
2602
|
-
id,
|
|
2603
|
-
name: id,
|
|
2604
|
-
adoptsFrom: {
|
|
2605
|
-
module: rri("./person"),
|
|
2606
|
-
name: "Person"
|
|
2607
|
-
},
|
|
2608
|
-
displayNames: ["Person"],
|
|
2609
|
-
types,
|
|
2610
|
-
iconHTML
|
|
2611
|
-
});
|
|
2612
|
-
return batch;
|
|
2613
|
-
};
|
|
2614
|
-
await setupIndex(adapter, [{
|
|
2615
|
-
realm_url: testRealmURL,
|
|
2616
|
-
current_generation: 1
|
|
2617
|
-
}], []);
|
|
2618
|
-
let abandoned = await stageCard("abandoned");
|
|
2619
|
-
let recent = await stageCard("recent");
|
|
2620
|
-
let longAgo = Date.now() - 2880 * 60 * 1e3;
|
|
2621
|
-
await adapter.execute(`UPDATE boxel_index_pending SET indexed_at = $1, diagnostics = NULL WHERE staging_id = $2`, { bind: [longAgo, abandoned.stagingId] });
|
|
2622
|
-
await adapter.execute(`UPDATE prerendered_html_pending SET rendered_at = $1, diagnostics = NULL WHERE staging_id = $2`, { bind: [longAgo, abandoned.stagingId] });
|
|
2623
|
-
let result = await (await stageCard("committed")).done();
|
|
2624
|
-
let stagings = async (table) => (await adapter.execute(`SELECT DISTINCT staging_id FROM ${table} WHERE realm_url = $1`, { bind: [testRealmURL] })).map((row) => row.staging_id).sort();
|
|
2625
|
-
assert.deepEqual(await stagings("boxel_index_pending"), [recent.stagingId], "the idle staging is cleared from the index channel; the recent one and the committed one are not left behind");
|
|
2626
|
-
assert.deepEqual(await stagings("prerendered_html_pending"), [recent.stagingId], "and from the HTML channel");
|
|
2627
|
-
assert.strictEqual(result.janitorStagingsCleared, 1, "the janitor counts the one staging it cleared");
|
|
2628
|
-
assert.strictEqual(result.janitorRowsCleared, 2, "its index row and its HTML row");
|
|
2629
|
-
});
|
|
2630
|
-
(0, import_qunit.test)("forgetResumedRows drops a URL from resumedRows so future tombstoning is no longer guarded", async function(assert) {
|
|
2631
|
-
let url = `${testRealmURL}1.json`;
|
|
2632
|
-
await setupIndex(adapter, [{
|
|
2633
|
-
realm_url: testRealmURL,
|
|
2634
|
-
current_generation: 1
|
|
2635
|
-
}], {
|
|
2636
|
-
working: [{
|
|
2637
|
-
url,
|
|
2638
|
-
generation: 1,
|
|
2639
|
-
realm_url: testRealmURL,
|
|
2640
|
-
type: "instance",
|
|
2641
|
-
job_id: 42,
|
|
2642
|
-
staging_id: jobStagingId(42, 1),
|
|
2643
|
-
last_modified: "1700000000",
|
|
2644
|
-
deps: [],
|
|
2645
|
-
types: []
|
|
2646
|
-
}],
|
|
2647
|
-
production: []
|
|
2648
|
-
});
|
|
2649
|
-
let batch = await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2650
|
-
jobId: 42,
|
|
2651
|
-
reservationId: 2,
|
|
2652
|
-
priority: 0,
|
|
2653
|
-
queueWaitMs: null,
|
|
2654
|
-
concurrencyGroup: null,
|
|
2655
|
-
laneFamily: null
|
|
2656
|
-
});
|
|
2657
|
-
assert.true(batch.resumedRows.has(url), "precondition: row is initially resumed");
|
|
2658
|
-
batch.forgetResumedRows([url]);
|
|
2659
|
-
assert.false(batch.resumedRows.has(url), "after forgetResumedRows the URL is no longer protected");
|
|
2660
|
-
batch.forgetResumedRows([`${testRealmURL}does-not-exist.json`]);
|
|
2661
|
-
assert.strictEqual(batch.resumedRows.size, 0, "forgetResumedRows on a URL that is not present is a no-op");
|
|
2662
|
-
});
|
|
2663
|
-
(0, import_qunit.test)("done() promotes resumed rows even though they were never visited in this attempt", async function(assert) {
|
|
2664
|
-
let url = `${testRealmURL}1.json`;
|
|
2665
|
-
let resumedDoc = {
|
|
2666
|
-
id: url,
|
|
2667
|
-
type: "card",
|
|
2668
|
-
attributes: { name: "Resumed" },
|
|
2669
|
-
meta: { adoptsFrom: {
|
|
2670
|
-
module: rri(`./person`),
|
|
2671
|
-
name: "Person"
|
|
2672
|
-
} }
|
|
2673
|
-
};
|
|
2674
|
-
await setupIndex(adapter, [{
|
|
2675
|
-
realm_url: testRealmURL,
|
|
2676
|
-
current_generation: 1
|
|
2677
|
-
}], {
|
|
2678
|
-
working: [{
|
|
2679
|
-
url,
|
|
2680
|
-
generation: 1,
|
|
2681
|
-
realm_url: testRealmURL,
|
|
2682
|
-
type: "instance",
|
|
2683
|
-
job_id: 42,
|
|
2684
|
-
staging_id: jobStagingId(42, 1),
|
|
2685
|
-
last_modified: "1700000000",
|
|
2686
|
-
is_deleted: false,
|
|
2687
|
-
has_error: false,
|
|
2688
|
-
deps: [],
|
|
2689
|
-
types: [],
|
|
2690
|
-
pristine_doc: resumedDoc,
|
|
2691
|
-
search_doc: { name: "Resumed" }
|
|
2692
|
-
}],
|
|
2693
|
-
production: []
|
|
2694
|
-
});
|
|
2695
|
-
await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, {
|
|
2696
|
-
jobId: 42,
|
|
2697
|
-
reservationId: 2,
|
|
2698
|
-
priority: 0,
|
|
2699
|
-
queueWaitMs: null,
|
|
2700
|
-
concurrencyGroup: null,
|
|
2701
|
-
laneFamily: null
|
|
2702
|
-
})).done();
|
|
2703
|
-
let [promoted] = await adapter.execute(`SELECT pristine_doc, search_doc FROM boxel_index WHERE url = $1`, {
|
|
2704
|
-
bind: [url],
|
|
2705
|
-
coerceTypes: {
|
|
2706
|
-
pristine_doc: "JSON",
|
|
2707
|
-
search_doc: "JSON"
|
|
2708
|
-
}
|
|
2709
|
-
});
|
|
2710
|
-
assert.deepEqual(promoted?.pristine_doc, resumedDoc, "resumed row was promoted to boxel_index by done()");
|
|
2711
|
-
assert.deepEqual(promoted?.search_doc, { name: "Resumed" }, "resumed row search_doc landed in boxel_index");
|
|
2712
|
-
});
|
|
2713
|
-
(0, import_qunit.module)("getOrderingDependencyRows", function() {
|
|
2714
|
-
const stagingJob = {
|
|
2715
|
-
jobId: 7,
|
|
2716
|
-
reservationId: 1,
|
|
2717
|
-
priority: 0,
|
|
2718
|
-
queueWaitMs: null,
|
|
2719
|
-
concurrencyGroup: null,
|
|
2720
|
-
laneFamily: null
|
|
2721
|
-
};
|
|
2722
|
-
(0, import_qunit.test)("returns production row when URL exists only in boxel_index", async function(assert) {
|
|
2723
|
-
let url = `${testRealmURL}prod-only.json`;
|
|
2724
|
-
let depUrl = `${testRealmURL}prod-only-dep.json`;
|
|
2725
|
-
await setupIndex(adapter, [{
|
|
2726
|
-
realm_url: testRealmURL,
|
|
2727
|
-
current_generation: 1
|
|
2728
|
-
}], {
|
|
2729
|
-
working: [],
|
|
2730
|
-
production: [{
|
|
2731
|
-
url,
|
|
2732
|
-
generation: 1,
|
|
2733
|
-
realm_url: testRealmURL,
|
|
2734
|
-
type: "instance",
|
|
2735
|
-
deps: [depUrl],
|
|
2736
|
-
types: []
|
|
2737
|
-
}]
|
|
2738
|
-
});
|
|
2739
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2740
|
-
assert.deepEqual(rows, [{
|
|
2741
|
-
url,
|
|
2742
|
-
type: "instance",
|
|
2743
|
-
deps: [depUrl]
|
|
2744
|
-
}], "returns the production row deps");
|
|
2745
|
-
});
|
|
2746
|
-
(0, import_qunit.test)("returns the staged row when URL exists only in boxel_index_pending and is not deleted", async function(assert) {
|
|
2747
|
-
let url = `${testRealmURL}working-only.json`;
|
|
2748
|
-
let depUrl = `${testRealmURL}working-only-dep.json`;
|
|
2749
|
-
await setupIndex(adapter, [{
|
|
2750
|
-
realm_url: testRealmURL,
|
|
2751
|
-
current_generation: 1
|
|
2752
|
-
}], {
|
|
2753
|
-
working: [{
|
|
2754
|
-
url,
|
|
2755
|
-
generation: 1,
|
|
2756
|
-
realm_url: testRealmURL,
|
|
2757
|
-
type: "instance",
|
|
2758
|
-
job_id: stagingJob.jobId,
|
|
2759
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2760
|
-
is_deleted: false,
|
|
2761
|
-
deps: [depUrl],
|
|
2762
|
-
types: []
|
|
2763
|
-
}],
|
|
2764
|
-
production: []
|
|
2765
|
-
});
|
|
2766
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2767
|
-
assert.deepEqual(rows, [{
|
|
2768
|
-
url,
|
|
2769
|
-
type: "instance",
|
|
2770
|
-
deps: [depUrl]
|
|
2771
|
-
}], "returns the working row deps");
|
|
2772
|
-
});
|
|
2773
|
-
(0, import_qunit.test)("working non-deleted wins over production when both exist", async function(assert) {
|
|
2774
|
-
let url = `${testRealmURL}both.json`;
|
|
2775
|
-
let workingDep = `${testRealmURL}working-dep.json`;
|
|
2776
|
-
let productionDep = `${testRealmURL}production-dep.json`;
|
|
2777
|
-
await setupIndex(adapter, [{
|
|
2778
|
-
realm_url: testRealmURL,
|
|
2779
|
-
current_generation: 1
|
|
2780
|
-
}], {
|
|
2781
|
-
working: [{
|
|
2782
|
-
url,
|
|
2783
|
-
generation: 1,
|
|
2784
|
-
realm_url: testRealmURL,
|
|
2785
|
-
type: "instance",
|
|
2786
|
-
job_id: stagingJob.jobId,
|
|
2787
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2788
|
-
is_deleted: false,
|
|
2789
|
-
deps: [workingDep],
|
|
2790
|
-
types: []
|
|
2791
|
-
}],
|
|
2792
|
-
production: [{
|
|
2793
|
-
url,
|
|
2794
|
-
generation: 1,
|
|
2795
|
-
realm_url: testRealmURL,
|
|
2796
|
-
type: "instance",
|
|
2797
|
-
deps: [productionDep],
|
|
2798
|
-
types: []
|
|
2799
|
-
}]
|
|
2800
|
-
});
|
|
2801
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2802
|
-
assert.deepEqual(rows, [{
|
|
2803
|
-
url,
|
|
2804
|
-
type: "instance",
|
|
2805
|
-
deps: [workingDep]
|
|
2806
|
-
}], "working-non-deleted beat production");
|
|
2807
|
-
});
|
|
2808
|
-
(0, import_qunit.test)("production wins over deleted working row", async function(assert) {
|
|
2809
|
-
let url = `${testRealmURL}deleted-working.json`;
|
|
2810
|
-
let workingDep = `${testRealmURL}should-not-appear.json`;
|
|
2811
|
-
let productionDep = `${testRealmURL}production-dep.json`;
|
|
2812
|
-
await setupIndex(adapter, [{
|
|
2813
|
-
realm_url: testRealmURL,
|
|
2814
|
-
current_generation: 1
|
|
2815
|
-
}], {
|
|
2816
|
-
working: [{
|
|
2817
|
-
url,
|
|
2818
|
-
generation: 1,
|
|
2819
|
-
realm_url: testRealmURL,
|
|
2820
|
-
type: "instance",
|
|
2821
|
-
job_id: stagingJob.jobId,
|
|
2822
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2823
|
-
is_deleted: true,
|
|
2824
|
-
deps: [workingDep],
|
|
2825
|
-
types: []
|
|
2826
|
-
}],
|
|
2827
|
-
production: [{
|
|
2828
|
-
url,
|
|
2829
|
-
generation: 1,
|
|
2830
|
-
realm_url: testRealmURL,
|
|
2831
|
-
type: "instance",
|
|
2832
|
-
deps: [productionDep],
|
|
2833
|
-
types: []
|
|
2834
|
-
}]
|
|
2835
|
-
});
|
|
2836
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2837
|
-
assert.deepEqual(rows, [{
|
|
2838
|
-
url,
|
|
2839
|
-
type: "instance",
|
|
2840
|
-
deps: [productionDep]
|
|
2841
|
-
}], "production picked when working row is deleted");
|
|
2842
|
-
});
|
|
2843
|
-
(0, import_qunit.test)("falls back to deleted working row when no production exists", async function(assert) {
|
|
2844
|
-
let url = `${testRealmURL}deleted-only.json`;
|
|
2845
|
-
let depUrl = `${testRealmURL}deleted-only-dep.json`;
|
|
2846
|
-
await setupIndex(adapter, [{
|
|
2847
|
-
realm_url: testRealmURL,
|
|
2848
|
-
current_generation: 1
|
|
2849
|
-
}], {
|
|
2850
|
-
working: [{
|
|
2851
|
-
url,
|
|
2852
|
-
generation: 1,
|
|
2853
|
-
realm_url: testRealmURL,
|
|
2854
|
-
type: "instance",
|
|
2855
|
-
job_id: stagingJob.jobId,
|
|
2856
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2857
|
-
is_deleted: true,
|
|
2858
|
-
deps: [depUrl],
|
|
2859
|
-
types: []
|
|
2860
|
-
}],
|
|
2861
|
-
production: []
|
|
2862
|
-
});
|
|
2863
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2864
|
-
assert.deepEqual(rows, [{
|
|
2865
|
-
url,
|
|
2866
|
-
type: "instance",
|
|
2867
|
-
deps: [depUrl]
|
|
2868
|
-
}], "returns deleted working row as last-resort fallback");
|
|
2869
|
-
});
|
|
2870
|
-
(0, import_qunit.test)("mixed input returns the correct provenance per URL", async function(assert) {
|
|
2871
|
-
let workingOnlyUrl = `${testRealmURL}mixed-working.json`;
|
|
2872
|
-
let workingOnlyDep = `${testRealmURL}mixed-working-dep.json`;
|
|
2873
|
-
let productionOnlyUrl = `${testRealmURL}mixed-production.json`;
|
|
2874
|
-
let productionOnlyDep = `${testRealmURL}mixed-production-dep.json`;
|
|
2875
|
-
let bothUrl = `${testRealmURL}mixed-both.json`;
|
|
2876
|
-
let bothWorkingDep = `${testRealmURL}mixed-both-working-dep.json`;
|
|
2877
|
-
let bothProductionDep = `${testRealmURL}mixed-both-production-dep.json`;
|
|
2878
|
-
await setupIndex(adapter, [{
|
|
2879
|
-
realm_url: testRealmURL,
|
|
2880
|
-
current_generation: 1
|
|
2881
|
-
}], {
|
|
2882
|
-
working: [{
|
|
2883
|
-
url: workingOnlyUrl,
|
|
2884
|
-
generation: 1,
|
|
2885
|
-
realm_url: testRealmURL,
|
|
2886
|
-
type: "instance",
|
|
2887
|
-
job_id: stagingJob.jobId,
|
|
2888
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2889
|
-
is_deleted: false,
|
|
2890
|
-
deps: [workingOnlyDep],
|
|
2891
|
-
types: []
|
|
2892
|
-
}, {
|
|
2893
|
-
url: bothUrl,
|
|
2894
|
-
generation: 1,
|
|
2895
|
-
realm_url: testRealmURL,
|
|
2896
|
-
type: "instance",
|
|
2897
|
-
job_id: stagingJob.jobId,
|
|
2898
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2899
|
-
is_deleted: false,
|
|
2900
|
-
deps: [bothWorkingDep],
|
|
2901
|
-
types: []
|
|
2902
|
-
}],
|
|
2903
|
-
production: [{
|
|
2904
|
-
url: productionOnlyUrl,
|
|
2905
|
-
generation: 1,
|
|
2906
|
-
realm_url: testRealmURL,
|
|
2907
|
-
type: "instance",
|
|
2908
|
-
deps: [productionOnlyDep],
|
|
2909
|
-
types: []
|
|
2910
|
-
}, {
|
|
2911
|
-
url: bothUrl,
|
|
2912
|
-
generation: 1,
|
|
2913
|
-
realm_url: testRealmURL,
|
|
2914
|
-
type: "instance",
|
|
2915
|
-
deps: [bothProductionDep],
|
|
2916
|
-
types: []
|
|
2917
|
-
}]
|
|
2918
|
-
});
|
|
2919
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([
|
|
2920
|
-
workingOnlyUrl,
|
|
2921
|
-
productionOnlyUrl,
|
|
2922
|
-
bothUrl
|
|
2923
|
-
]);
|
|
2924
|
-
let byUrl = new Map(rows.map((r) => [r.url, r]));
|
|
2925
|
-
assert.deepEqual(byUrl.get(workingOnlyUrl), {
|
|
2926
|
-
url: workingOnlyUrl,
|
|
2927
|
-
type: "instance",
|
|
2928
|
-
deps: [workingOnlyDep]
|
|
2929
|
-
}, "working-only URL returns working deps");
|
|
2930
|
-
assert.deepEqual(byUrl.get(productionOnlyUrl), {
|
|
2931
|
-
url: productionOnlyUrl,
|
|
2932
|
-
type: "instance",
|
|
2933
|
-
deps: [productionOnlyDep]
|
|
2934
|
-
}, "production-only URL returns production deps");
|
|
2935
|
-
assert.deepEqual(byUrl.get(bothUrl), {
|
|
2936
|
-
url: bothUrl,
|
|
2937
|
-
type: "instance",
|
|
2938
|
-
deps: [bothWorkingDep]
|
|
2939
|
-
}, "URL present in both returns working deps (working wins)");
|
|
2940
|
-
assert.strictEqual(rows.length, 3, "one row returned per requested URL");
|
|
2941
|
-
});
|
|
2942
|
-
(0, import_qunit.test)("projection excludes error_doc, has_error, and is_deleted", async function(assert) {
|
|
2943
|
-
let url = `${testRealmURL}projection.json`;
|
|
2944
|
-
await setupIndex(adapter, [{
|
|
2945
|
-
realm_url: testRealmURL,
|
|
2946
|
-
current_generation: 1
|
|
2947
|
-
}], {
|
|
2948
|
-
working: [{
|
|
2949
|
-
url,
|
|
2950
|
-
generation: 1,
|
|
2951
|
-
realm_url: testRealmURL,
|
|
2952
|
-
type: "instance",
|
|
2953
|
-
job_id: stagingJob.jobId,
|
|
2954
|
-
staging_id: jobStagingId(stagingJob.jobId, stagingJob.reservationId),
|
|
2955
|
-
is_deleted: false,
|
|
2956
|
-
has_error: true,
|
|
2957
|
-
error_doc: {
|
|
2958
|
-
id: url,
|
|
2959
|
-
status: 500,
|
|
2960
|
-
title: "kaboom",
|
|
2961
|
-
message: "should not be returned",
|
|
2962
|
-
additionalErrors: null
|
|
2963
|
-
},
|
|
2964
|
-
deps: [],
|
|
2965
|
-
types: []
|
|
2966
|
-
}],
|
|
2967
|
-
production: []
|
|
2968
|
-
});
|
|
2969
|
-
let rows = await (await indexWriter.createBatch(new URL(testRealmURL), virtualNetwork, stagingJob)).getOrderingDependencyRows([url]);
|
|
2970
|
-
assert.strictEqual(rows.length, 1, "one row returned");
|
|
2971
|
-
let row = rows[0];
|
|
2972
|
-
assert.deepEqual(Object.keys(row).sort(), [
|
|
2973
|
-
"deps",
|
|
2974
|
-
"type",
|
|
2975
|
-
"url"
|
|
2976
|
-
], "row exposes only url, type, deps — no error_doc / has_error / is_deleted");
|
|
2977
|
-
});
|
|
2978
|
-
});
|
|
2979
|
-
});
|
|
2980
|
-
(0, import_qunit.module)("Unit | index-writer | error doc merge", function() {
|
|
2981
|
-
function err(message, extra = {}) {
|
|
2982
|
-
return {
|
|
2983
|
-
message,
|
|
2984
|
-
status: 500,
|
|
2985
|
-
additionalErrors: null,
|
|
2986
|
-
...extra
|
|
2987
|
-
};
|
|
2988
|
-
}
|
|
2989
|
-
(0, import_qunit.test)("a higher-generation error doc supersedes a lower-generation one", function(assert) {
|
|
2990
|
-
let recent = err("recent", {
|
|
2991
|
-
id: "x",
|
|
2992
|
-
additionalErrors: [err("recent-dep")]
|
|
2993
|
-
});
|
|
2994
|
-
let stale = err("stale", {
|
|
2995
|
-
id: "x",
|
|
2996
|
-
additionalErrors: [err("stale-dep")]
|
|
2997
|
-
});
|
|
2998
|
-
assert.strictEqual(mergeErrorsByGeneration(recent, 5, stale, 4).message, "recent", "the newer generation wins when it is the first argument");
|
|
2999
|
-
assert.strictEqual(mergeErrorsByGeneration(stale, 4, recent, 5).message, "recent", "the newer generation wins when it is the second argument");
|
|
3000
|
-
assert.deepEqual(mergeErrorsByGeneration(recent, 5, stale, 4).additionalErrors, [err("recent-dep")], "the stale document contributes nothing — it is not merged in");
|
|
3001
|
-
});
|
|
3002
|
-
(0, import_qunit.test)("equal-generation error docs merge their detail, keeping the primary message", function(assert) {
|
|
3003
|
-
let merged = mergeErrorsByGeneration(err("primary message", {
|
|
3004
|
-
id: "card",
|
|
3005
|
-
deps: ["dep-a"],
|
|
3006
|
-
additionalErrors: [err("existing-dep", { id: "existing" })]
|
|
3007
|
-
}), 3, err("secondary message", {
|
|
3008
|
-
id: "module",
|
|
3009
|
-
deps: ["dep-b"],
|
|
3010
|
-
additionalErrors: [err("missing middle-field", { id: "middle" })]
|
|
3011
|
-
}), 3);
|
|
3012
|
-
assert.strictEqual(merged.message, "primary message", "the primary envelope message is preserved");
|
|
3013
|
-
let messages = (merged.additionalErrors ?? []).map((e) => e.message);
|
|
3014
|
-
assert.ok(messages.includes("existing-dep"), "the primary's own additionalErrors are kept");
|
|
3015
|
-
assert.ok(messages.includes("missing middle-field"), "the secondary's nested dependency detail is folded in flat");
|
|
3016
|
-
assert.ok(messages.includes("secondary message"), "the secondary's own top-level error is folded in as a flat entry");
|
|
3017
|
-
assert.deepEqual(merged.deps, ["dep-a", "dep-b"], "deps are unioned");
|
|
3018
|
-
});
|
|
3019
|
-
(0, import_qunit.test)("merging an error doc identical to the primary adds nothing", function(assert) {
|
|
3020
|
-
let primary = err("same failure", {
|
|
3021
|
-
id: "x",
|
|
3022
|
-
status: 500
|
|
3023
|
-
});
|
|
3024
|
-
let secondary = err("same failure", {
|
|
3025
|
-
id: "x",
|
|
3026
|
-
status: 500
|
|
3027
|
-
});
|
|
3028
|
-
assert.strictEqual(mergeErrorDetail(primary, secondary).additionalErrors, null, "a secondary that matches the primary (id, message, status) is deduped away");
|
|
3029
|
-
});
|
|
3030
|
-
(0, import_qunit.test)("the secondary's nested detail is folded flat, not nested", function(assert) {
|
|
3031
|
-
let merged = mergeErrorDetail(err("primary", { id: "p" }), err("secondary", {
|
|
3032
|
-
id: "s",
|
|
3033
|
-
additionalErrors: [err("leaf detail", { id: "leaf" })]
|
|
3034
|
-
}));
|
|
3035
|
-
assert.deepEqual((merged.additionalErrors ?? []).map((e) => e.message), ["secondary", "leaf detail"], "both the secondary envelope and its nested detail sit at the top level");
|
|
3036
|
-
let secondaryEntry = (merged.additionalErrors ?? []).find((e) => e.id === "s");
|
|
3037
|
-
assert.strictEqual(secondaryEntry.additionalErrors, null, "the folded secondary entry does not carry its own nested list");
|
|
3038
|
-
});
|
|
3039
|
-
});
|
|
3040
|
-
//#endregion
|