uigraph 1.0.0 → 1.0.1
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/dist/bin.mjs +134 -56911
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
- package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
- package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
- package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
- package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
- package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
- package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
- package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
- package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
- package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
- package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
- package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
- package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
- package/dist/viewer/assets/button-DZj74qS7.js +1 -0
- package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
- package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
- package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
- package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
- package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
- package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
- package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
- package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
- package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
- package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
- package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
- package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
- package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
- package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
- package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
- package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
- package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
- package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
- package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
- package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
- package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
- package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
- package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
- package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
- package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
- package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
- package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
- package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
- package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
- package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
- package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
- package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
- package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
- package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
- package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
- package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
- package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
- package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
- package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
- package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
- package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
- package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
- package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
- package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
- package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
- package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
- package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
- package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
- package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
- package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
- package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
- package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
- package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
- package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
- package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
- package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
- package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
- package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
- package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
- package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
- package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
- package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
- package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
- package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
- package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
- package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
- package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
- package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
- package/dist/viewer/assets/index-CIf0GId3.js +74 -0
- package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
- package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
- package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
- package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
- package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
- package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
- package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
- package/dist/viewer/assets/input--C59pq6j.js +1 -0
- package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
- package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
- package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
- package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
- package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
- package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
- package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
- package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
- package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
- package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
- package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
- package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
- package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
- package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
- package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
- package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
- package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
- package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
- package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
- package/dist/viewer/assets/popover-476u3TN0.js +1 -0
- package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
- package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
- package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
- package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
- package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
- package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
- package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
- package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
- package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
- package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
- package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
- package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
- package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
- package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
- package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
- package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
- package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
- package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
- package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
- package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
- package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
- package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
- package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
- package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
- package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
- package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
- package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
- package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
- package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
- package/dist/viewer/assets/table-B4pFND-o.js +1 -0
- package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
- package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
- package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
- package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
- package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
- package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
- package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
- package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
- package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
- package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
- package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
- package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
- package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
- package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
- package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
- package/dist/viewer/index.html +10 -1
- package/package.json +56 -56
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
- package/dist/auth-storage-BvNH97p9.mjs +0 -2180
- package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
- package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
- package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
- package/dist/cli-2R6QQFp1.mjs +0 -451
- package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
- package/dist/config-D8DMGzIq.mjs +0 -647
- package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
- package/dist/diagnostics-xdSgQR8t.mjs +0 -131
- package/dist/dist-BRyghrKX.mjs +0 -404
- package/dist/dist-D0EzrblG.mjs +0 -12161
- package/dist/dist-EKhnHWHG.mjs +0 -140221
- package/dist/dist-pQtuusFv.mjs +0 -1243
- package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
- package/dist/env-api-keys-uytNub6O.mjs +0 -122
- package/dist/error-body-FhmCtR7m.mjs +0 -101
- package/dist/esm-D5isprgl.mjs +0 -1533
- package/dist/esm-DnqE4pfM.mjs +0 -104876
- package/dist/execute-BoTKl80U.mjs +0 -1715
- package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
- package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
- package/dist/google-shared-2CyYa4VE.mjs +0 -33438
- package/dist/google-vertex-DZDUQPKa.mjs +0 -378
- package/dist/hash-DN7ukSfd.mjs +0 -16
- package/dist/headers-GhQHLk-3.mjs +0 -17
- package/dist/jiti-9kWALm4Y.mjs +0 -5439
- package/dist/jiti-loader-f21DrY1K.mjs +0 -27
- package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
- package/dist/json-parse-B2mHg7o7.mjs +0 -381
- package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
- package/dist/lib-Dj1gKQJc.mjs +0 -24379
- package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
- package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
- package/dist/models-DBdii9gQ.mjs +0 -1255
- package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
- package/dist/node-B0NU8X55.mjs +0 -2479
- package/dist/node-B8gaKm9g.mjs +0 -23
- package/dist/openai-I3_AqKDX.mjs +0 -17357
- package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
- package/dist/openai-completions-a_mH01ii.mjs +0 -994
- package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
- package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
- package/dist/openai-responses-a9lV_U7O.mjs +0 -270
- package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
- package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
- package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
- package/dist/pi-messages-B5ietIBq.mjs +0 -306
- package/dist/provider-env-BJhgA66g.mjs +0 -37
- package/dist/provider-retry-DXYM7rVE.mjs +0 -79
- package/dist/runtime-DTkBxiaM.mjs +0 -2822
- package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
- package/dist/shell-836_JFnI.mjs +0 -162
- package/dist/source-CKPndhKl.mjs +0 -478
- package/dist/src-DNm2QRm3.mjs +0 -5028
- package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
- package/dist/token-DEUkymby.mjs +0 -56
- package/dist/token-util-Cx5S4eKt.mjs +0 -3
- package/dist/tool-DHDYqsyG.mjs +0 -6673
- package/dist/transform-messages-BClk99Vn.mjs +0 -477
- package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
- package/dist/typescript-Br-vsRJV.mjs +0 -6737
- package/dist/uuid-CNCZqNBb.mjs +0 -49
- package/dist/v2-1z8ijsD3.mjs +0 -6120
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
- package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
- package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
- package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
- package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
- package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
- package/dist/viewer/assets/button-DadqadpO.js +0 -1
- package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
- package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
- package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
- package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
- package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
- package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
- package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
- package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
- package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
- package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
- package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
- package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
- package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
- package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
- package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
- package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
- package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
- package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
- package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
- package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
- package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
- package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
- package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
- package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
- package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
- package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
- package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
- package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
- package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
- package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
- package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
- package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
- package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
- package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
- package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
- package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
- package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
- package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
- package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
- package/dist/viewer/assets/select-DDtnmSET.js +0 -1
- package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
- package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
- package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
- package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
- package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
- package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
- package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
- package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
- package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
- package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
- package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
- package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
- package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
- package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
- package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
- package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
package/dist/esm-D5isprgl.mjs
DELETED
|
@@ -1,1533 +0,0 @@
|
|
|
1
|
-
import { a as MethodIdempotency, c as protoBase64, i as Code, l as Message, n as ConnectError, o as MethodKind, r as codeFromString, s as proto3, t as createContextValues } from "./esm-DnqE4pfM.mjs";
|
|
2
|
-
//#region node_modules/.pnpm/@bufbuild+protobuf@1.10.0/node_modules/@bufbuild/protobuf/dist/esm/google/protobuf/any_pb.js
|
|
3
|
-
/**
|
|
4
|
-
* `Any` contains an arbitrary serialized protocol buffer message along with a
|
|
5
|
-
* URL that describes the type of the serialized message.
|
|
6
|
-
*
|
|
7
|
-
* Protobuf library provides support to pack/unpack Any values in the form
|
|
8
|
-
* of utility functions or additional generated methods of the Any type.
|
|
9
|
-
*
|
|
10
|
-
* Example 1: Pack and unpack a message in C++.
|
|
11
|
-
*
|
|
12
|
-
* Foo foo = ...;
|
|
13
|
-
* Any any;
|
|
14
|
-
* any.PackFrom(foo);
|
|
15
|
-
* ...
|
|
16
|
-
* if (any.UnpackTo(&foo)) {
|
|
17
|
-
* ...
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* Example 2: Pack and unpack a message in Java.
|
|
21
|
-
*
|
|
22
|
-
* Foo foo = ...;
|
|
23
|
-
* Any any = Any.pack(foo);
|
|
24
|
-
* ...
|
|
25
|
-
* if (any.is(Foo.class)) {
|
|
26
|
-
* foo = any.unpack(Foo.class);
|
|
27
|
-
* }
|
|
28
|
-
* // or ...
|
|
29
|
-
* if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
|
30
|
-
* foo = any.unpack(Foo.getDefaultInstance());
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* Example 3: Pack and unpack a message in Python.
|
|
34
|
-
*
|
|
35
|
-
* foo = Foo(...)
|
|
36
|
-
* any = Any()
|
|
37
|
-
* any.Pack(foo)
|
|
38
|
-
* ...
|
|
39
|
-
* if any.Is(Foo.DESCRIPTOR):
|
|
40
|
-
* any.Unpack(foo)
|
|
41
|
-
* ...
|
|
42
|
-
*
|
|
43
|
-
* Example 4: Pack and unpack a message in Go
|
|
44
|
-
*
|
|
45
|
-
* foo := &pb.Foo{...}
|
|
46
|
-
* any, err := anypb.New(foo)
|
|
47
|
-
* if err != nil {
|
|
48
|
-
* ...
|
|
49
|
-
* }
|
|
50
|
-
* ...
|
|
51
|
-
* foo := &pb.Foo{}
|
|
52
|
-
* if err := any.UnmarshalTo(foo); err != nil {
|
|
53
|
-
* ...
|
|
54
|
-
* }
|
|
55
|
-
*
|
|
56
|
-
* The pack methods provided by protobuf library will by default use
|
|
57
|
-
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
|
58
|
-
* methods only use the fully qualified type name after the last '/'
|
|
59
|
-
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
|
60
|
-
* name "y.z".
|
|
61
|
-
*
|
|
62
|
-
* JSON
|
|
63
|
-
* ====
|
|
64
|
-
* The JSON representation of an `Any` value uses the regular
|
|
65
|
-
* representation of the deserialized, embedded message, with an
|
|
66
|
-
* additional field `@type` which contains the type URL. Example:
|
|
67
|
-
*
|
|
68
|
-
* package google.profile;
|
|
69
|
-
* message Person {
|
|
70
|
-
* string first_name = 1;
|
|
71
|
-
* string last_name = 2;
|
|
72
|
-
* }
|
|
73
|
-
*
|
|
74
|
-
* {
|
|
75
|
-
* "@type": "type.googleapis.com/google.profile.Person",
|
|
76
|
-
* "firstName": <string>,
|
|
77
|
-
* "lastName": <string>
|
|
78
|
-
* }
|
|
79
|
-
*
|
|
80
|
-
* If the embedded message type is well-known and has a custom JSON
|
|
81
|
-
* representation, that representation will be embedded adding a field
|
|
82
|
-
* `value` which holds the custom JSON in addition to the `@type`
|
|
83
|
-
* field. Example (for message [google.protobuf.Duration][]):
|
|
84
|
-
*
|
|
85
|
-
* {
|
|
86
|
-
* "@type": "type.googleapis.com/google.protobuf.Duration",
|
|
87
|
-
* "value": "1.212s"
|
|
88
|
-
* }
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* @generated from message google.protobuf.Any
|
|
92
|
-
*/
|
|
93
|
-
var Any = class Any extends Message {
|
|
94
|
-
constructor(data) {
|
|
95
|
-
super();
|
|
96
|
-
/**
|
|
97
|
-
* A URL/resource name that uniquely identifies the type of the serialized
|
|
98
|
-
* protocol buffer message. This string must contain at least
|
|
99
|
-
* one "/" character. The last segment of the URL's path must represent
|
|
100
|
-
* the fully qualified name of the type (as in
|
|
101
|
-
* `path/google.protobuf.Duration`). The name should be in a canonical form
|
|
102
|
-
* (e.g., leading "." is not accepted).
|
|
103
|
-
*
|
|
104
|
-
* In practice, teams usually precompile into the binary all types that they
|
|
105
|
-
* expect it to use in the context of Any. However, for URLs which use the
|
|
106
|
-
* scheme `http`, `https`, or no scheme, one can optionally set up a type
|
|
107
|
-
* server that maps type URLs to message definitions as follows:
|
|
108
|
-
*
|
|
109
|
-
* * If no scheme is provided, `https` is assumed.
|
|
110
|
-
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
|
111
|
-
* value in binary format, or produce an error.
|
|
112
|
-
* * Applications are allowed to cache lookup results based on the
|
|
113
|
-
* URL, or have them precompiled into a binary to avoid any
|
|
114
|
-
* lookup. Therefore, binary compatibility needs to be preserved
|
|
115
|
-
* on changes to types. (Use versioned type names to manage
|
|
116
|
-
* breaking changes.)
|
|
117
|
-
*
|
|
118
|
-
* Note: this functionality is not currently available in the official
|
|
119
|
-
* protobuf release, and it is not used for type URLs beginning with
|
|
120
|
-
* type.googleapis.com. As of May 2023, there are no widely used type server
|
|
121
|
-
* implementations and no plans to implement one.
|
|
122
|
-
*
|
|
123
|
-
* Schemes other than `http`, `https` (or the empty scheme) might be
|
|
124
|
-
* used with implementation specific semantics.
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* @generated from field: string type_url = 1;
|
|
128
|
-
*/
|
|
129
|
-
this.typeUrl = "";
|
|
130
|
-
/**
|
|
131
|
-
* Must be a valid serialized protocol buffer of the above specified type.
|
|
132
|
-
*
|
|
133
|
-
* @generated from field: bytes value = 2;
|
|
134
|
-
*/
|
|
135
|
-
this.value = /* @__PURE__ */ new Uint8Array(0);
|
|
136
|
-
proto3.util.initPartial(data, this);
|
|
137
|
-
}
|
|
138
|
-
toJson(options) {
|
|
139
|
-
var _a;
|
|
140
|
-
if (this.typeUrl === "") return {};
|
|
141
|
-
const typeName = this.typeUrlToName(this.typeUrl);
|
|
142
|
-
const messageType = (_a = options === null || options === void 0 ? void 0 : options.typeRegistry) === null || _a === void 0 ? void 0 : _a.findMessage(typeName);
|
|
143
|
-
if (!messageType) throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);
|
|
144
|
-
let json = messageType.fromBinary(this.value).toJson(options);
|
|
145
|
-
if (typeName.startsWith("google.protobuf.") || json === null || Array.isArray(json) || typeof json !== "object") json = { value: json };
|
|
146
|
-
json["@type"] = this.typeUrl;
|
|
147
|
-
return json;
|
|
148
|
-
}
|
|
149
|
-
fromJson(json, options) {
|
|
150
|
-
var _a;
|
|
151
|
-
if (json === null || Array.isArray(json) || typeof json != "object") throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${json === null ? "null" : Array.isArray(json) ? "array" : typeof json}`);
|
|
152
|
-
if (Object.keys(json).length == 0) return this;
|
|
153
|
-
const typeUrl = json["@type"];
|
|
154
|
-
if (typeof typeUrl != "string" || typeUrl == "") throw new Error(`cannot decode message google.protobuf.Any from JSON: "@type" is empty`);
|
|
155
|
-
const typeName = this.typeUrlToName(typeUrl), messageType = (_a = options === null || options === void 0 ? void 0 : options.typeRegistry) === null || _a === void 0 ? void 0 : _a.findMessage(typeName);
|
|
156
|
-
if (!messageType) throw new Error(`cannot decode message google.protobuf.Any from JSON: ${typeUrl} is not in the type registry`);
|
|
157
|
-
let message;
|
|
158
|
-
if (typeName.startsWith("google.protobuf.") && Object.prototype.hasOwnProperty.call(json, "value")) message = messageType.fromJson(json["value"], options);
|
|
159
|
-
else {
|
|
160
|
-
const copy = Object.assign({}, json);
|
|
161
|
-
delete copy["@type"];
|
|
162
|
-
message = messageType.fromJson(copy, options);
|
|
163
|
-
}
|
|
164
|
-
this.packFrom(message);
|
|
165
|
-
return this;
|
|
166
|
-
}
|
|
167
|
-
packFrom(message) {
|
|
168
|
-
this.value = message.toBinary();
|
|
169
|
-
this.typeUrl = this.typeNameToUrl(message.getType().typeName);
|
|
170
|
-
}
|
|
171
|
-
unpackTo(target) {
|
|
172
|
-
if (!this.is(target.getType())) return false;
|
|
173
|
-
target.fromBinary(this.value);
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
unpack(registry) {
|
|
177
|
-
if (this.typeUrl === "") return;
|
|
178
|
-
const messageType = registry.findMessage(this.typeUrlToName(this.typeUrl));
|
|
179
|
-
if (!messageType) return;
|
|
180
|
-
return messageType.fromBinary(this.value);
|
|
181
|
-
}
|
|
182
|
-
is(type) {
|
|
183
|
-
if (this.typeUrl === "") return false;
|
|
184
|
-
const name = this.typeUrlToName(this.typeUrl);
|
|
185
|
-
let typeName = "";
|
|
186
|
-
if (typeof type === "string") typeName = type;
|
|
187
|
-
else typeName = type.typeName;
|
|
188
|
-
return name === typeName;
|
|
189
|
-
}
|
|
190
|
-
typeNameToUrl(name) {
|
|
191
|
-
return `type.googleapis.com/${name}`;
|
|
192
|
-
}
|
|
193
|
-
typeUrlToName(url) {
|
|
194
|
-
if (!url.length) throw new Error(`invalid type url: ${url}`);
|
|
195
|
-
const slash = url.lastIndexOf("/");
|
|
196
|
-
const name = slash >= 0 ? url.substring(slash + 1) : url;
|
|
197
|
-
if (!name.length) throw new Error(`invalid type url: ${url}`);
|
|
198
|
-
return name;
|
|
199
|
-
}
|
|
200
|
-
static pack(message) {
|
|
201
|
-
const any = new Any();
|
|
202
|
-
any.packFrom(message);
|
|
203
|
-
return any;
|
|
204
|
-
}
|
|
205
|
-
static fromBinary(bytes, options) {
|
|
206
|
-
return new Any().fromBinary(bytes, options);
|
|
207
|
-
}
|
|
208
|
-
static fromJson(jsonValue, options) {
|
|
209
|
-
return new Any().fromJson(jsonValue, options);
|
|
210
|
-
}
|
|
211
|
-
static fromJsonString(jsonString, options) {
|
|
212
|
-
return new Any().fromJsonString(jsonString, options);
|
|
213
|
-
}
|
|
214
|
-
static equals(a, b) {
|
|
215
|
-
return proto3.util.equals(Any, a, b);
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
Any.runtime = proto3;
|
|
219
|
-
Any.typeName = "google.protobuf.Any";
|
|
220
|
-
Any.fields = proto3.util.newFieldList(() => [{
|
|
221
|
-
no: 1,
|
|
222
|
-
name: "type_url",
|
|
223
|
-
kind: "scalar",
|
|
224
|
-
T: 9
|
|
225
|
-
}, {
|
|
226
|
-
no: 2,
|
|
227
|
-
name: "value",
|
|
228
|
-
kind: "scalar",
|
|
229
|
-
T: 12
|
|
230
|
-
}]);
|
|
231
|
-
//#endregion
|
|
232
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/http-headers.js
|
|
233
|
-
function decodeBinaryHeader(value, type, options) {
|
|
234
|
-
try {
|
|
235
|
-
const bytes = protoBase64.dec(value);
|
|
236
|
-
if (type) return type.fromBinary(bytes, options);
|
|
237
|
-
return bytes;
|
|
238
|
-
} catch (e) {
|
|
239
|
-
throw ConnectError.from(e, Code.DataLoss);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Merge two or more Headers objects by appending all fields from
|
|
244
|
-
* all inputs to a new Headers object.
|
|
245
|
-
*/
|
|
246
|
-
function appendHeaders(...headers) {
|
|
247
|
-
const h = new Headers();
|
|
248
|
-
for (const e of headers) e.forEach((value, key) => {
|
|
249
|
-
h.append(key, value);
|
|
250
|
-
});
|
|
251
|
-
return h;
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/envelope.js
|
|
255
|
-
/**
|
|
256
|
-
* Create a WHATWG ReadableStream of enveloped messages from a ReadableStream
|
|
257
|
-
* of bytes.
|
|
258
|
-
*
|
|
259
|
-
* Ideally, this would simply be a TransformStream, but ReadableStream.pipeThrough
|
|
260
|
-
* does not have the necessary availability at this time.
|
|
261
|
-
*
|
|
262
|
-
* @private Internal code, does not follow semantic versioning.
|
|
263
|
-
*/
|
|
264
|
-
function createEnvelopeReadableStream(stream) {
|
|
265
|
-
let reader;
|
|
266
|
-
let buffer = /* @__PURE__ */ new Uint8Array(0);
|
|
267
|
-
function append(chunk) {
|
|
268
|
-
const n = new Uint8Array(buffer.length + chunk.length);
|
|
269
|
-
n.set(buffer);
|
|
270
|
-
n.set(chunk, buffer.length);
|
|
271
|
-
buffer = n;
|
|
272
|
-
}
|
|
273
|
-
return new ReadableStream({
|
|
274
|
-
start() {
|
|
275
|
-
reader = stream.getReader();
|
|
276
|
-
},
|
|
277
|
-
async pull(controller) {
|
|
278
|
-
let header = void 0;
|
|
279
|
-
for (;;) {
|
|
280
|
-
if (header === void 0 && buffer.byteLength >= 5) {
|
|
281
|
-
let length = 0;
|
|
282
|
-
for (let i = 1; i < 5; i++) length = (length << 8) + buffer[i];
|
|
283
|
-
header = {
|
|
284
|
-
flags: buffer[0],
|
|
285
|
-
length
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
if (header !== void 0 && buffer.byteLength >= header.length + 5) break;
|
|
289
|
-
const result = await reader.read();
|
|
290
|
-
if (result.done) break;
|
|
291
|
-
append(result.value);
|
|
292
|
-
}
|
|
293
|
-
if (header === void 0) {
|
|
294
|
-
if (buffer.byteLength == 0) {
|
|
295
|
-
controller.close();
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
controller.error(new ConnectError("premature end of stream", Code.DataLoss));
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
const data = buffer.subarray(5, 5 + header.length);
|
|
302
|
-
buffer = buffer.subarray(5 + header.length);
|
|
303
|
-
controller.enqueue({
|
|
304
|
-
flags: header.flags,
|
|
305
|
-
data
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Encode a single enveloped message.
|
|
312
|
-
*
|
|
313
|
-
* @private Internal code, does not follow semantic versioning.
|
|
314
|
-
*/
|
|
315
|
-
function encodeEnvelope(flags, data) {
|
|
316
|
-
const bytes = new Uint8Array(data.length + 5);
|
|
317
|
-
bytes.set(data, 5);
|
|
318
|
-
const v = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
319
|
-
v.setUint8(0, flags);
|
|
320
|
-
v.setUint32(1, data.length);
|
|
321
|
-
return bytes;
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/signals.js
|
|
325
|
-
/**
|
|
326
|
-
* Create an AbortController that is automatically aborted if one of the given
|
|
327
|
-
* signals is aborted.
|
|
328
|
-
*
|
|
329
|
-
* For convenience, the linked AbortSignals can be undefined.
|
|
330
|
-
*
|
|
331
|
-
* If the controller or any of the signals is aborted, all event listeners are
|
|
332
|
-
* removed.
|
|
333
|
-
*
|
|
334
|
-
* @private Internal code, does not follow semantic versioning.
|
|
335
|
-
*/
|
|
336
|
-
function createLinkedAbortController(...signals) {
|
|
337
|
-
const controller = new AbortController();
|
|
338
|
-
const sa = signals.filter((s) => s !== void 0).concat(controller.signal);
|
|
339
|
-
for (const signal of sa) {
|
|
340
|
-
if (signal.aborted) {
|
|
341
|
-
onAbort.apply(signal);
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
signal.addEventListener("abort", onAbort);
|
|
345
|
-
}
|
|
346
|
-
function onAbort() {
|
|
347
|
-
if (!controller.signal.aborted) controller.abort(getAbortSignalReason(this));
|
|
348
|
-
for (const signal of sa) signal.removeEventListener("abort", onAbort);
|
|
349
|
-
}
|
|
350
|
-
return controller;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Create a deadline signal. The returned object contains an AbortSignal, but
|
|
354
|
-
* also a cleanup function to stop the timer, which must be called once the
|
|
355
|
-
* calling code is no longer interested in the signal.
|
|
356
|
-
*
|
|
357
|
-
* Ideally, we would simply use AbortSignal.timeout(), but it is not widely
|
|
358
|
-
* available yet.
|
|
359
|
-
*
|
|
360
|
-
* @private Internal code, does not follow semantic versioning.
|
|
361
|
-
*/
|
|
362
|
-
function createDeadlineSignal(timeoutMs) {
|
|
363
|
-
const controller = new AbortController();
|
|
364
|
-
const listener = () => {
|
|
365
|
-
controller.abort(new ConnectError("the operation timed out", Code.DeadlineExceeded));
|
|
366
|
-
};
|
|
367
|
-
let timeoutId;
|
|
368
|
-
if (timeoutMs !== void 0) {
|
|
369
|
-
if (timeoutMs <= 0) listener();
|
|
370
|
-
else timeoutId = setTimeout(listener, timeoutMs);
|
|
371
|
-
}
|
|
372
|
-
return {
|
|
373
|
-
signal: controller.signal,
|
|
374
|
-
cleanup: () => clearTimeout(timeoutId)
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Returns the reason why an AbortSignal was aborted. Returns undefined if the
|
|
379
|
-
* signal has not been aborted.
|
|
380
|
-
*
|
|
381
|
-
* The property AbortSignal.reason is not widely available. This function
|
|
382
|
-
* returns an AbortError if the signal is aborted, but reason is undefined.
|
|
383
|
-
*
|
|
384
|
-
* @private Internal code, does not follow semantic versioning.
|
|
385
|
-
*/
|
|
386
|
-
function getAbortSignalReason(signal) {
|
|
387
|
-
if (!signal.aborted) return;
|
|
388
|
-
if (signal.reason !== void 0) return signal.reason;
|
|
389
|
-
const e = /* @__PURE__ */ new Error("This operation was aborted");
|
|
390
|
-
e.name = "AbortError";
|
|
391
|
-
return e;
|
|
392
|
-
}
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/trailer.js
|
|
395
|
-
/**
|
|
396
|
-
* Parse a gRPC-web trailer, a set of header fields separated by CRLF.
|
|
397
|
-
*
|
|
398
|
-
* @private Internal code, does not follow semantic versioning.
|
|
399
|
-
*/
|
|
400
|
-
function trailerParse(data) {
|
|
401
|
-
const headers = new Headers();
|
|
402
|
-
const lines = new TextDecoder().decode(data).split("\r\n");
|
|
403
|
-
for (const line of lines) {
|
|
404
|
-
if (line === "") continue;
|
|
405
|
-
const i = line.indexOf(":");
|
|
406
|
-
if (i > 0) {
|
|
407
|
-
const name = line.substring(0, i).trim();
|
|
408
|
-
const value = line.substring(i + 1).trim();
|
|
409
|
-
headers.append(name, value);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return headers;
|
|
413
|
-
}
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/headers.js
|
|
416
|
-
/**
|
|
417
|
-
* @private Internal code, does not follow semantic versioning.
|
|
418
|
-
*/
|
|
419
|
-
const headerContentType$1 = "Content-Type";
|
|
420
|
-
const headerTimeout$1 = "Grpc-Timeout";
|
|
421
|
-
const headerGrpcStatus = "Grpc-Status";
|
|
422
|
-
const headerStatusDetailsBin = "Grpc-Status-Details-Bin";
|
|
423
|
-
const headerUserAgent$1 = "User-Agent";
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/headers.js
|
|
426
|
-
/**
|
|
427
|
-
* gRPC-web does not use the standard header User-Agent.
|
|
428
|
-
*
|
|
429
|
-
* @private Internal code, does not follow semantic versioning.
|
|
430
|
-
*/
|
|
431
|
-
const headerXUserAgent = "X-User-Agent";
|
|
432
|
-
/**
|
|
433
|
-
* The canonical grpc/grpc-web JavaScript implementation sets
|
|
434
|
-
* this request header with value "1".
|
|
435
|
-
* Some servers may rely on the header to identify gRPC-web
|
|
436
|
-
* requests. For example the proxy by improbable:
|
|
437
|
-
* https://github.com/improbable-eng/grpc-web/blob/53aaf4cdc0fede7103c1b06f0cfc560c003a5c41/go/grpcweb/wrapper.go#L231
|
|
438
|
-
*
|
|
439
|
-
* @private Internal code, does not follow semantic versioning.
|
|
440
|
-
*/
|
|
441
|
-
const headerXGrpcWeb = "X-Grpc-Web";
|
|
442
|
-
//#endregion
|
|
443
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/content-type.js
|
|
444
|
-
const contentTypeProto = "application/grpc-web+proto";
|
|
445
|
-
const contentTypeJson = "application/grpc-web+json";
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/gen/status_pb.js
|
|
448
|
-
/**
|
|
449
|
-
* The `Status` type defines a logical error model that is suitable for different
|
|
450
|
-
* programming environments, including REST APIs and RPC APIs. It is used by
|
|
451
|
-
* [gRPC](https://github.com/grpc). The error model is designed to be:
|
|
452
|
-
*
|
|
453
|
-
* - Simple to use and understand for most users
|
|
454
|
-
* - Flexible enough to meet unexpected needs
|
|
455
|
-
*
|
|
456
|
-
* # Overview
|
|
457
|
-
*
|
|
458
|
-
* The `Status` message contains three pieces of data: error code, error message,
|
|
459
|
-
* and error details. The error code should be an enum value of
|
|
460
|
-
* [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
|
|
461
|
-
* error message should be a developer-facing English message that helps
|
|
462
|
-
* developers *understand* and *resolve* the error. If a localized user-facing
|
|
463
|
-
* error message is needed, put the localized message in the error details or
|
|
464
|
-
* localize it in the client. The optional error details may contain arbitrary
|
|
465
|
-
* information about the error. There is a predefined set of error detail types
|
|
466
|
-
* in the package `google.rpc` which can be used for common error conditions.
|
|
467
|
-
*
|
|
468
|
-
* # Language mapping
|
|
469
|
-
*
|
|
470
|
-
* The `Status` message is the logical representation of the error model, but it
|
|
471
|
-
* is not necessarily the actual wire format. When the `Status` message is
|
|
472
|
-
* exposed in different client libraries and different wire protocols, it can be
|
|
473
|
-
* mapped differently. For example, it will likely be mapped to some exceptions
|
|
474
|
-
* in Java, but more likely mapped to some error codes in C.
|
|
475
|
-
*
|
|
476
|
-
* # Other uses
|
|
477
|
-
*
|
|
478
|
-
* The error model and the `Status` message can be used in a variety of
|
|
479
|
-
* environments, either with or without APIs, to provide a
|
|
480
|
-
* consistent developer experience across different environments.
|
|
481
|
-
*
|
|
482
|
-
* Example uses of this error model include:
|
|
483
|
-
*
|
|
484
|
-
* - Partial errors. If a service needs to return partial errors to the client,
|
|
485
|
-
* it may embed the `Status` in the normal response to indicate the partial
|
|
486
|
-
* errors.
|
|
487
|
-
*
|
|
488
|
-
* - Workflow errors. A typical workflow has multiple steps. Each step may
|
|
489
|
-
* have a `Status` message for error reporting purpose.
|
|
490
|
-
*
|
|
491
|
-
* - Batch operations. If a client uses batch request and batch response, the
|
|
492
|
-
* `Status` message should be used directly inside batch response, one for
|
|
493
|
-
* each error sub-response.
|
|
494
|
-
*
|
|
495
|
-
* - Asynchronous operations. If an API call embeds asynchronous operation
|
|
496
|
-
* results in its response, the status of those operations should be
|
|
497
|
-
* represented directly using the `Status` message.
|
|
498
|
-
*
|
|
499
|
-
* - Logging. If some API errors are stored in logs, the message `Status` could
|
|
500
|
-
* be used directly after any stripping needed for security/privacy reasons.
|
|
501
|
-
*
|
|
502
|
-
* @generated from message google.rpc.Status
|
|
503
|
-
*/
|
|
504
|
-
var Status = class Status extends Message {
|
|
505
|
-
constructor(data) {
|
|
506
|
-
super();
|
|
507
|
-
/**
|
|
508
|
-
* The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
|
|
509
|
-
*
|
|
510
|
-
* @generated from field: int32 code = 1;
|
|
511
|
-
*/
|
|
512
|
-
this.code = 0;
|
|
513
|
-
/**
|
|
514
|
-
* A developer-facing error message, which should be in English. Any
|
|
515
|
-
* user-facing error message should be localized and sent in the
|
|
516
|
-
* [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
|
|
517
|
-
*
|
|
518
|
-
* @generated from field: string message = 2;
|
|
519
|
-
*/
|
|
520
|
-
this.message = "";
|
|
521
|
-
/**
|
|
522
|
-
* A list of messages that carry the error details. There will be a
|
|
523
|
-
* common set of message types for APIs to use.
|
|
524
|
-
*
|
|
525
|
-
* @generated from field: repeated google.protobuf.Any details = 3;
|
|
526
|
-
*/
|
|
527
|
-
this.details = [];
|
|
528
|
-
proto3.util.initPartial(data, this);
|
|
529
|
-
}
|
|
530
|
-
static fromBinary(bytes, options) {
|
|
531
|
-
return new Status().fromBinary(bytes, options);
|
|
532
|
-
}
|
|
533
|
-
static fromJson(jsonValue, options) {
|
|
534
|
-
return new Status().fromJson(jsonValue, options);
|
|
535
|
-
}
|
|
536
|
-
static fromJsonString(jsonString, options) {
|
|
537
|
-
return new Status().fromJsonString(jsonString, options);
|
|
538
|
-
}
|
|
539
|
-
static equals(a, b) {
|
|
540
|
-
return proto3.util.equals(Status, a, b);
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
Status.runtime = proto3;
|
|
544
|
-
Status.typeName = "google.rpc.Status";
|
|
545
|
-
Status.fields = proto3.util.newFieldList(() => [
|
|
546
|
-
{
|
|
547
|
-
no: 1,
|
|
548
|
-
name: "code",
|
|
549
|
-
kind: "scalar",
|
|
550
|
-
T: 5
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
no: 2,
|
|
554
|
-
name: "message",
|
|
555
|
-
kind: "scalar",
|
|
556
|
-
T: 9
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
no: 3,
|
|
560
|
-
name: "details",
|
|
561
|
-
kind: "message",
|
|
562
|
-
T: Any,
|
|
563
|
-
repeated: true
|
|
564
|
-
}
|
|
565
|
-
]);
|
|
566
|
-
/**
|
|
567
|
-
* Find an error status in the given Headers object, which can be either
|
|
568
|
-
* a trailer, or a header (as allowed for so-called trailers-only responses).
|
|
569
|
-
* The field "grpc-status-details-bin" is inspected, and if not present,
|
|
570
|
-
* the fields "grpc-status" and "grpc-message" are used.
|
|
571
|
-
* Returns an error only if the gRPC status code is > 0.
|
|
572
|
-
*
|
|
573
|
-
* @private Internal code, does not follow semantic versioning.
|
|
574
|
-
*/
|
|
575
|
-
function findTrailerError(headerOrTrailer) {
|
|
576
|
-
var _a;
|
|
577
|
-
const statusBytes = headerOrTrailer.get(headerStatusDetailsBin);
|
|
578
|
-
if (statusBytes != null) {
|
|
579
|
-
const status = decodeBinaryHeader(statusBytes, Status);
|
|
580
|
-
if (status.code == 0) return;
|
|
581
|
-
const error = new ConnectError(status.message, status.code, headerOrTrailer);
|
|
582
|
-
error.details = status.details.map((any) => ({
|
|
583
|
-
type: any.typeUrl.substring(any.typeUrl.lastIndexOf("/") + 1),
|
|
584
|
-
value: any.value
|
|
585
|
-
}));
|
|
586
|
-
return error;
|
|
587
|
-
}
|
|
588
|
-
const grpcStatus = headerOrTrailer.get(headerGrpcStatus);
|
|
589
|
-
if (grpcStatus != null) {
|
|
590
|
-
if (grpcStatus === "0") return;
|
|
591
|
-
const code = parseInt(grpcStatus, 10);
|
|
592
|
-
if (code in Code) return new ConnectError(decodeURIComponent((_a = headerOrTrailer.get("Grpc-Message")) !== null && _a !== void 0 ? _a : ""), code, headerOrTrailer);
|
|
593
|
-
return new ConnectError(`invalid grpc-status: ${grpcStatus}`, Code.Internal, headerOrTrailer);
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
//#endregion
|
|
597
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/create-method-url.js
|
|
598
|
-
/**
|
|
599
|
-
* Create a URL for the given RPC. This simply adds the qualified
|
|
600
|
-
* service name, a slash, and the method name to the path of the given
|
|
601
|
-
* baseUrl.
|
|
602
|
-
*
|
|
603
|
-
* For example, the baseUri https://example.com and method "Say" from
|
|
604
|
-
* the service example.ElizaService results in:
|
|
605
|
-
* https://example.com/example.ElizaService/Say
|
|
606
|
-
*
|
|
607
|
-
* This format is used by the protocols Connect, gRPC and Twirp.
|
|
608
|
-
*
|
|
609
|
-
* Note that this function also accepts a protocol-relative baseUrl.
|
|
610
|
-
* If given an empty string or "/" as a baseUrl, it returns just the
|
|
611
|
-
* path.
|
|
612
|
-
*/
|
|
613
|
-
function createMethodUrl(baseUrl, service, method) {
|
|
614
|
-
const s = typeof service == "string" ? service : service.typeName;
|
|
615
|
-
const m = typeof method == "string" ? method : method.name;
|
|
616
|
-
return baseUrl.toString().replace(/\/?$/, `/${s}/${m}`);
|
|
617
|
-
}
|
|
618
|
-
//#endregion
|
|
619
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/normalize.js
|
|
620
|
-
/**
|
|
621
|
-
* Takes a partial protobuf messages of the
|
|
622
|
-
* specified message type as input, and returns full instances.
|
|
623
|
-
*/
|
|
624
|
-
function normalize(type, message) {
|
|
625
|
-
return message instanceof type ? message : new type(message);
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* Takes an AsyncIterable of partial protobuf messages of the
|
|
629
|
-
* specified message type as input, and yields full instances.
|
|
630
|
-
*/
|
|
631
|
-
function normalizeIterable(messageType, input) {
|
|
632
|
-
function transform(result) {
|
|
633
|
-
if (result.done === true) return result;
|
|
634
|
-
return {
|
|
635
|
-
done: result.done,
|
|
636
|
-
value: normalize(messageType, result.value)
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
return { [Symbol.asyncIterator]() {
|
|
640
|
-
const it = input[Symbol.asyncIterator]();
|
|
641
|
-
const res = { next: () => it.next().then(transform) };
|
|
642
|
-
if (it.throw !== void 0) res.throw = (e) => it.throw(e).then(transform);
|
|
643
|
-
if (it.return !== void 0) res.return = (v) => it.return(v).then(transform);
|
|
644
|
-
return res;
|
|
645
|
-
} };
|
|
646
|
-
}
|
|
647
|
-
//#endregion
|
|
648
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/interceptor.js
|
|
649
|
-
/**
|
|
650
|
-
* applyInterceptors takes the given UnaryFn or ServerStreamingFn, and wraps
|
|
651
|
-
* it with each of the given interceptors, returning a new UnaryFn or
|
|
652
|
-
* ServerStreamingFn.
|
|
653
|
-
*/
|
|
654
|
-
function applyInterceptors(next, interceptors) {
|
|
655
|
-
var _a;
|
|
656
|
-
return (_a = interceptors === null || interceptors === void 0 ? void 0 : interceptors.concat().reverse().reduce((n, i) => i(n), next)) !== null && _a !== void 0 ? _a : next;
|
|
657
|
-
}
|
|
658
|
-
//#endregion
|
|
659
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/serialization.js
|
|
660
|
-
/**
|
|
661
|
-
* Sets default JSON serialization options for connect-es.
|
|
662
|
-
*
|
|
663
|
-
* With standard protobuf JSON serialization, unknown JSON fields are
|
|
664
|
-
* rejected by default. In connect-es, unknown JSON fields are ignored
|
|
665
|
-
* by default.
|
|
666
|
-
*/
|
|
667
|
-
function getJsonOptions(options) {
|
|
668
|
-
var _a;
|
|
669
|
-
const o = Object.assign({}, options);
|
|
670
|
-
(_a = o.ignoreUnknownFields) !== null && _a !== void 0 || (o.ignoreUnknownFields = true);
|
|
671
|
-
return o;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Returns functions to normalize and serialize the input message
|
|
675
|
-
* of an RPC, and to parse the output message of an RPC.
|
|
676
|
-
*
|
|
677
|
-
* @private Internal code, does not follow semantic versioning.
|
|
678
|
-
*/
|
|
679
|
-
function createClientMethodSerializers(method, useBinaryFormat, jsonOptions, binaryOptions) {
|
|
680
|
-
const input = useBinaryFormat ? createBinarySerialization(method.I, binaryOptions) : createJsonSerialization(method.I, jsonOptions);
|
|
681
|
-
return {
|
|
682
|
-
parse: (useBinaryFormat ? createBinarySerialization(method.O, binaryOptions) : createJsonSerialization(method.O, jsonOptions)).parse,
|
|
683
|
-
serialize: input.serialize
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* Creates a Serialization object for serializing the given protobuf message
|
|
688
|
-
* with the protobuf binary format.
|
|
689
|
-
*/
|
|
690
|
-
function createBinarySerialization(messageType, options) {
|
|
691
|
-
return {
|
|
692
|
-
parse(data) {
|
|
693
|
-
try {
|
|
694
|
-
return messageType.fromBinary(data, options);
|
|
695
|
-
} catch (e) {
|
|
696
|
-
const m = e instanceof Error ? e.message : String(e);
|
|
697
|
-
throw new ConnectError(`parse binary: ${m}`, Code.Internal);
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
serialize(data) {
|
|
701
|
-
try {
|
|
702
|
-
return data.toBinary(options);
|
|
703
|
-
} catch (e) {
|
|
704
|
-
const m = e instanceof Error ? e.message : String(e);
|
|
705
|
-
throw new ConnectError(`serialize binary: ${m}`, Code.Internal);
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
/**
|
|
711
|
-
* Creates a Serialization object for serializing the given protobuf message
|
|
712
|
-
* with the protobuf canonical JSON encoding.
|
|
713
|
-
*
|
|
714
|
-
* By default, unknown fields are ignored.
|
|
715
|
-
*/
|
|
716
|
-
function createJsonSerialization(messageType, options) {
|
|
717
|
-
var _a, _b;
|
|
718
|
-
const textEncoder = (_a = options === null || options === void 0 ? void 0 : options.textEncoder) !== null && _a !== void 0 ? _a : new TextEncoder();
|
|
719
|
-
const textDecoder = (_b = options === null || options === void 0 ? void 0 : options.textDecoder) !== null && _b !== void 0 ? _b : new TextDecoder();
|
|
720
|
-
const o = getJsonOptions(options);
|
|
721
|
-
return {
|
|
722
|
-
parse(data) {
|
|
723
|
-
try {
|
|
724
|
-
const json = textDecoder.decode(data);
|
|
725
|
-
return messageType.fromJsonString(json, o);
|
|
726
|
-
} catch (e) {
|
|
727
|
-
throw ConnectError.from(e, Code.InvalidArgument);
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
serialize(data) {
|
|
731
|
-
try {
|
|
732
|
-
const json = data.toJsonString(o);
|
|
733
|
-
return textEncoder.encode(json);
|
|
734
|
-
} catch (e) {
|
|
735
|
-
throw ConnectError.from(e, Code.Internal);
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
//#endregion
|
|
741
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/content-type.js
|
|
742
|
-
/**
|
|
743
|
-
* Regular Expression that matches any valid Connect Content-Type header value.
|
|
744
|
-
*
|
|
745
|
-
* @private Internal code, does not follow semantic versioning.
|
|
746
|
-
*/
|
|
747
|
-
const contentTypeRegExp = /^application\/(connect\+)?(?:(json)(?:; ?charset=utf-?8)?|(proto))$/i;
|
|
748
|
-
const contentTypeUnaryProto = "application/proto";
|
|
749
|
-
const contentTypeUnaryJson = "application/json";
|
|
750
|
-
const contentTypeStreamProto = "application/connect+proto";
|
|
751
|
-
const contentTypeStreamJson = "application/connect+json";
|
|
752
|
-
/**
|
|
753
|
-
* Parse a Connect Content-Type header.
|
|
754
|
-
*
|
|
755
|
-
* @private Internal code, does not follow semantic versioning.
|
|
756
|
-
*/
|
|
757
|
-
function parseContentType(contentType) {
|
|
758
|
-
const match = contentType === null || contentType === void 0 ? void 0 : contentType.match(contentTypeRegExp);
|
|
759
|
-
if (!match) return;
|
|
760
|
-
return {
|
|
761
|
-
stream: !!match[1],
|
|
762
|
-
binary: !!match[3]
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* Parse a Connect error from a JSON value.
|
|
767
|
-
* Will return a ConnectError, and throw the provided fallback if parsing failed.
|
|
768
|
-
*
|
|
769
|
-
* @private Internal code, does not follow semantic versioning.
|
|
770
|
-
*/
|
|
771
|
-
function errorFromJson(jsonValue, metadata, fallback) {
|
|
772
|
-
var _a;
|
|
773
|
-
if (metadata) new Headers(metadata).forEach((value, key) => fallback.metadata.append(key, value));
|
|
774
|
-
if (typeof jsonValue !== "object" || jsonValue == null || Array.isArray(jsonValue)) throw fallback;
|
|
775
|
-
let code = fallback.code;
|
|
776
|
-
if ("code" in jsonValue && typeof jsonValue.code === "string") code = (_a = codeFromString(jsonValue.code)) !== null && _a !== void 0 ? _a : code;
|
|
777
|
-
const message = jsonValue.message;
|
|
778
|
-
if (message != null && typeof message !== "string") throw fallback;
|
|
779
|
-
const error = new ConnectError(message !== null && message !== void 0 ? message : "", code, metadata);
|
|
780
|
-
if ("details" in jsonValue && Array.isArray(jsonValue.details)) for (const detail of jsonValue.details) {
|
|
781
|
-
if (detail === null || typeof detail != "object" || Array.isArray(detail) || typeof detail.type != "string" || typeof detail.value != "string") throw fallback;
|
|
782
|
-
try {
|
|
783
|
-
error.details.push({
|
|
784
|
-
type: detail.type,
|
|
785
|
-
value: protoBase64.dec(detail.value),
|
|
786
|
-
debug: detail.debug
|
|
787
|
-
});
|
|
788
|
-
} catch (e) {
|
|
789
|
-
throw fallback;
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
return error;
|
|
793
|
-
}
|
|
794
|
-
//#endregion
|
|
795
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/end-stream.js
|
|
796
|
-
/**
|
|
797
|
-
* Parse an EndStreamResponse of the Connect protocol.
|
|
798
|
-
* Throws a ConnectError on malformed input.
|
|
799
|
-
*
|
|
800
|
-
* @private Internal code, does not follow semantic versioning.
|
|
801
|
-
*/
|
|
802
|
-
function endStreamFromJson(data) {
|
|
803
|
-
const parseErr = new ConnectError("invalid end stream", Code.Unknown);
|
|
804
|
-
let jsonValue;
|
|
805
|
-
try {
|
|
806
|
-
jsonValue = JSON.parse(typeof data == "string" ? data : new TextDecoder().decode(data));
|
|
807
|
-
} catch (e) {
|
|
808
|
-
throw parseErr;
|
|
809
|
-
}
|
|
810
|
-
if (typeof jsonValue != "object" || jsonValue == null || Array.isArray(jsonValue)) throw parseErr;
|
|
811
|
-
const metadata = new Headers();
|
|
812
|
-
if ("metadata" in jsonValue) {
|
|
813
|
-
if (typeof jsonValue.metadata != "object" || jsonValue.metadata == null || Array.isArray(jsonValue.metadata)) throw parseErr;
|
|
814
|
-
for (const [key, values] of Object.entries(jsonValue.metadata)) {
|
|
815
|
-
if (!Array.isArray(values) || values.some((value) => typeof value != "string")) throw parseErr;
|
|
816
|
-
for (const value of values) metadata.append(key, value);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
return {
|
|
820
|
-
metadata,
|
|
821
|
-
error: "error" in jsonValue && jsonValue.error != null ? errorFromJson(jsonValue.error, metadata, parseErr) : void 0
|
|
822
|
-
};
|
|
823
|
-
}
|
|
824
|
-
//#endregion
|
|
825
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/headers.js
|
|
826
|
-
/**
|
|
827
|
-
* @private Internal code, does not follow semantic versioning.
|
|
828
|
-
*/
|
|
829
|
-
const headerContentType = "Content-Type";
|
|
830
|
-
const headerUnaryContentLength = "Content-Length";
|
|
831
|
-
const headerUnaryEncoding = "Content-Encoding";
|
|
832
|
-
const headerUnaryAcceptEncoding = "Accept-Encoding";
|
|
833
|
-
const headerTimeout = "Connect-Timeout-Ms";
|
|
834
|
-
const headerProtocolVersion = "Connect-Protocol-Version";
|
|
835
|
-
const headerUserAgent = "User-Agent";
|
|
836
|
-
//#endregion
|
|
837
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/http-status.js
|
|
838
|
-
/**
|
|
839
|
-
* Determine the Connect error code for the given HTTP status code.
|
|
840
|
-
* See https://connectrpc.com/docs/protocol/#http-to-error-code
|
|
841
|
-
*
|
|
842
|
-
* @private Internal code, does not follow semantic versioning.
|
|
843
|
-
*/
|
|
844
|
-
function codeFromHttpStatus$1(httpStatus) {
|
|
845
|
-
switch (httpStatus) {
|
|
846
|
-
case 400: return Code.Internal;
|
|
847
|
-
case 401: return Code.Unauthenticated;
|
|
848
|
-
case 403: return Code.PermissionDenied;
|
|
849
|
-
case 404: return Code.Unimplemented;
|
|
850
|
-
case 429: return Code.Unavailable;
|
|
851
|
-
case 502: return Code.Unavailable;
|
|
852
|
-
case 503: return Code.Unavailable;
|
|
853
|
-
case 504: return Code.Unavailable;
|
|
854
|
-
default: return Code.Unknown;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
//#endregion
|
|
858
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/trailer-mux.js
|
|
859
|
-
/**
|
|
860
|
-
* In unary RPCs, Connect transports trailing metadata as response header
|
|
861
|
-
* fields, prefixed with "trailer-".
|
|
862
|
-
*
|
|
863
|
-
* This function demuxes headers and trailers into two separate Headers
|
|
864
|
-
* objects.
|
|
865
|
-
*
|
|
866
|
-
* @private Internal code, does not follow semantic versioning.
|
|
867
|
-
*/
|
|
868
|
-
function trailerDemux(header) {
|
|
869
|
-
const h = new Headers(), t = new Headers();
|
|
870
|
-
header.forEach((value, key) => {
|
|
871
|
-
if (key.toLowerCase().startsWith("trailer-")) t.append(key.substring(8), value);
|
|
872
|
-
else h.append(key, value);
|
|
873
|
-
});
|
|
874
|
-
return [h, t];
|
|
875
|
-
}
|
|
876
|
-
//#endregion
|
|
877
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/request-header.js
|
|
878
|
-
/**
|
|
879
|
-
* Creates headers for a Connect request.
|
|
880
|
-
*
|
|
881
|
-
* @private Internal code, does not follow semantic versioning.
|
|
882
|
-
*/
|
|
883
|
-
function requestHeader$1(methodKind, useBinaryFormat, timeoutMs, userProvidedHeaders, setUserAgent) {
|
|
884
|
-
const result = new Headers(userProvidedHeaders !== null && userProvidedHeaders !== void 0 ? userProvidedHeaders : {});
|
|
885
|
-
if (timeoutMs !== void 0) result.set(headerTimeout, `${timeoutMs}`);
|
|
886
|
-
result.set(headerContentType, methodKind == MethodKind.Unary ? useBinaryFormat ? contentTypeUnaryProto : contentTypeUnaryJson : useBinaryFormat ? contentTypeStreamProto : contentTypeStreamJson);
|
|
887
|
-
result.set(headerProtocolVersion, "1");
|
|
888
|
-
if (setUserAgent && !result.has("User-Agent")) result.set(headerUserAgent, "connect-es/1.7.0");
|
|
889
|
-
return result;
|
|
890
|
-
}
|
|
891
|
-
//#endregion
|
|
892
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/validate-response.js
|
|
893
|
-
/**
|
|
894
|
-
* Validates response status and header for the Connect protocol.
|
|
895
|
-
* Throws a ConnectError if the header indicates an error, or if
|
|
896
|
-
* the content type is unexpected, with the following exception:
|
|
897
|
-
* For unary RPCs with an HTTP error status, this returns an error
|
|
898
|
-
* derived from the HTTP status instead of throwing it, giving an
|
|
899
|
-
* implementation a chance to parse a Connect error from the wire.
|
|
900
|
-
*
|
|
901
|
-
* @private Internal code, does not follow semantic versioning.
|
|
902
|
-
*/
|
|
903
|
-
function validateResponse$1(methodKind, useBinaryFormat, status, headers) {
|
|
904
|
-
const mimeType = headers.get(headerContentType);
|
|
905
|
-
const parsedType = parseContentType(mimeType);
|
|
906
|
-
if (status !== 200) {
|
|
907
|
-
const errorFromStatus = new ConnectError(`HTTP ${status}`, codeFromHttpStatus$1(status), headers);
|
|
908
|
-
if (methodKind == MethodKind.Unary && parsedType && !parsedType.binary) return {
|
|
909
|
-
isUnaryError: true,
|
|
910
|
-
unaryError: errorFromStatus
|
|
911
|
-
};
|
|
912
|
-
throw errorFromStatus;
|
|
913
|
-
}
|
|
914
|
-
const allowedContentType = {
|
|
915
|
-
binary: useBinaryFormat,
|
|
916
|
-
stream: methodKind !== MethodKind.Unary
|
|
917
|
-
};
|
|
918
|
-
if ((parsedType === null || parsedType === void 0 ? void 0 : parsedType.binary) !== allowedContentType.binary || parsedType.stream !== allowedContentType.stream) throw new ConnectError(`unsupported content type ${mimeType}`, parsedType === void 0 ? Code.Unknown : Code.Internal, headers);
|
|
919
|
-
return { isUnaryError: false };
|
|
920
|
-
}
|
|
921
|
-
//#endregion
|
|
922
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-connect/get-request.js
|
|
923
|
-
const contentTypePrefix = "application/";
|
|
924
|
-
function encodeMessageForUrl(message, useBase64) {
|
|
925
|
-
if (useBase64) return protoBase64.enc(message).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
926
|
-
else return encodeURIComponent(new TextDecoder().decode(message));
|
|
927
|
-
}
|
|
928
|
-
/**
|
|
929
|
-
* @private Internal code, does not follow semantic versioning.
|
|
930
|
-
*/
|
|
931
|
-
function transformConnectPostToGetRequest(request, message, useBase64) {
|
|
932
|
-
let query = `?connect=v1`;
|
|
933
|
-
const contentType = request.header.get(headerContentType);
|
|
934
|
-
if ((contentType === null || contentType === void 0 ? void 0 : contentType.indexOf(contentTypePrefix)) === 0) query += "&encoding=" + encodeURIComponent(contentType.slice(12));
|
|
935
|
-
const compression = request.header.get(headerUnaryEncoding);
|
|
936
|
-
if (compression !== null && compression !== "identity") {
|
|
937
|
-
query += "&compression=" + encodeURIComponent(compression);
|
|
938
|
-
useBase64 = true;
|
|
939
|
-
}
|
|
940
|
-
if (useBase64) query += "&base64=1";
|
|
941
|
-
query += "&message=" + encodeMessageForUrl(message, useBase64);
|
|
942
|
-
const url = request.url + query;
|
|
943
|
-
const header = new Headers(request.header);
|
|
944
|
-
[
|
|
945
|
-
headerProtocolVersion,
|
|
946
|
-
headerContentType,
|
|
947
|
-
headerUnaryContentLength,
|
|
948
|
-
headerUnaryEncoding,
|
|
949
|
-
headerUnaryAcceptEncoding
|
|
950
|
-
].forEach((h) => header.delete(h));
|
|
951
|
-
return Object.assign(Object.assign({}, request), {
|
|
952
|
-
init: Object.assign(Object.assign({}, request.init), { method: "GET" }),
|
|
953
|
-
url,
|
|
954
|
-
header
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
|
-
//#endregion
|
|
958
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol/run-call.js
|
|
959
|
-
/**
|
|
960
|
-
* Runs a unary method with the given interceptors. Note that this function
|
|
961
|
-
* is only used when implementing a Transport.
|
|
962
|
-
*/
|
|
963
|
-
function runUnaryCall(opt) {
|
|
964
|
-
const next = applyInterceptors(opt.next, opt.interceptors);
|
|
965
|
-
const [signal, abort, done] = setupSignal(opt);
|
|
966
|
-
return next(Object.assign(Object.assign({}, opt.req), {
|
|
967
|
-
message: normalize(opt.req.method.I, opt.req.message),
|
|
968
|
-
signal
|
|
969
|
-
})).then((res) => {
|
|
970
|
-
done();
|
|
971
|
-
return res;
|
|
972
|
-
}, abort);
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* Runs a server-streaming method with the given interceptors. Note that this
|
|
976
|
-
* function is only used when implementing a Transport.
|
|
977
|
-
*/
|
|
978
|
-
function runStreamingCall(opt) {
|
|
979
|
-
const next = applyInterceptors(opt.next, opt.interceptors);
|
|
980
|
-
const [signal, abort, done] = setupSignal(opt);
|
|
981
|
-
const req = Object.assign(Object.assign({}, opt.req), {
|
|
982
|
-
message: normalizeIterable(opt.req.method.I, opt.req.message),
|
|
983
|
-
signal
|
|
984
|
-
});
|
|
985
|
-
let doneCalled = false;
|
|
986
|
-
signal.addEventListener("abort", function() {
|
|
987
|
-
var _a, _b;
|
|
988
|
-
const it = opt.req.message[Symbol.asyncIterator]();
|
|
989
|
-
if (!doneCalled) (_a = it.throw) === null || _a === void 0 || _a.call(it, this.reason).catch(() => {});
|
|
990
|
-
(_b = it.return) === null || _b === void 0 || _b.call(it).catch(() => {});
|
|
991
|
-
});
|
|
992
|
-
return next(req).then((res) => {
|
|
993
|
-
return Object.assign(Object.assign({}, res), { message: { [Symbol.asyncIterator]() {
|
|
994
|
-
const it = res.message[Symbol.asyncIterator]();
|
|
995
|
-
return { next() {
|
|
996
|
-
return it.next().then((r) => {
|
|
997
|
-
if (r.done == true) {
|
|
998
|
-
doneCalled = true;
|
|
999
|
-
done();
|
|
1000
|
-
}
|
|
1001
|
-
return r;
|
|
1002
|
-
}, abort);
|
|
1003
|
-
} };
|
|
1004
|
-
} } });
|
|
1005
|
-
}, abort);
|
|
1006
|
-
}
|
|
1007
|
-
/**
|
|
1008
|
-
* Create an AbortSignal for Transport implementations. The signal is available
|
|
1009
|
-
* in UnaryRequest and StreamingRequest, and is triggered when the call is
|
|
1010
|
-
* aborted (via a timeout or explicit cancellation), errored (e.g. when reading
|
|
1011
|
-
* an error from the server from the wire), or finished successfully.
|
|
1012
|
-
*
|
|
1013
|
-
* Transport implementations can pass the signal to HTTP clients to ensure that
|
|
1014
|
-
* there are no unused connections leak.
|
|
1015
|
-
*
|
|
1016
|
-
* Returns a tuple:
|
|
1017
|
-
* [0]: The signal, which is also aborted if the optional deadline is reached.
|
|
1018
|
-
* [1]: Function to call if the Transport encountered an error.
|
|
1019
|
-
* [2]: Function to call if the Transport finished without an error.
|
|
1020
|
-
*/
|
|
1021
|
-
function setupSignal(opt) {
|
|
1022
|
-
const { signal, cleanup } = createDeadlineSignal(opt.timeoutMs);
|
|
1023
|
-
const controller = createLinkedAbortController(opt.signal, signal);
|
|
1024
|
-
return [
|
|
1025
|
-
controller.signal,
|
|
1026
|
-
function abort(reason) {
|
|
1027
|
-
const e = ConnectError.from(signal.aborted ? getAbortSignalReason(signal) : reason);
|
|
1028
|
-
controller.abort(e);
|
|
1029
|
-
cleanup();
|
|
1030
|
-
return Promise.reject(e);
|
|
1031
|
-
},
|
|
1032
|
-
function done() {
|
|
1033
|
-
cleanup();
|
|
1034
|
-
controller.abort();
|
|
1035
|
-
}
|
|
1036
|
-
];
|
|
1037
|
-
}
|
|
1038
|
-
//#endregion
|
|
1039
|
-
//#region node_modules/.pnpm/@connectrpc+connect-web@1.7.0_@bufbuild+protobuf@1.10.0_@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0_/node_modules/@connectrpc/connect-web/dist/esm/assert-fetch-api.js
|
|
1040
|
-
/**
|
|
1041
|
-
* Asserts that the fetch API is available.
|
|
1042
|
-
*/
|
|
1043
|
-
function assertFetchApi() {
|
|
1044
|
-
try {
|
|
1045
|
-
new Headers();
|
|
1046
|
-
} catch (_) {
|
|
1047
|
-
throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.");
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
//#endregion
|
|
1051
|
-
//#region node_modules/.pnpm/@connectrpc+connect-web@1.7.0_@bufbuild+protobuf@1.10.0_@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0_/node_modules/@connectrpc/connect-web/dist/esm/connect-transport.js
|
|
1052
|
-
var __await$1 = function(v) {
|
|
1053
|
-
return this instanceof __await$1 ? (this.v = v, this) : new __await$1(v);
|
|
1054
|
-
};
|
|
1055
|
-
var __asyncGenerator$1 = function(thisArg, _arguments, generator) {
|
|
1056
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1057
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1058
|
-
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
1059
|
-
return this;
|
|
1060
|
-
}, i;
|
|
1061
|
-
function awaitReturn(f) {
|
|
1062
|
-
return function(v) {
|
|
1063
|
-
return Promise.resolve(v).then(f, reject);
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
function verb(n, f) {
|
|
1067
|
-
if (g[n]) {
|
|
1068
|
-
i[n] = function(v) {
|
|
1069
|
-
return new Promise(function(a, b) {
|
|
1070
|
-
q.push([
|
|
1071
|
-
n,
|
|
1072
|
-
v,
|
|
1073
|
-
a,
|
|
1074
|
-
b
|
|
1075
|
-
]) > 1 || resume(n, v);
|
|
1076
|
-
});
|
|
1077
|
-
};
|
|
1078
|
-
if (f) i[n] = f(i[n]);
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
function resume(n, v) {
|
|
1082
|
-
try {
|
|
1083
|
-
step(g[n](v));
|
|
1084
|
-
} catch (e) {
|
|
1085
|
-
settle(q[0][3], e);
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
function step(r) {
|
|
1089
|
-
r.value instanceof __await$1 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
1090
|
-
}
|
|
1091
|
-
function fulfill(value) {
|
|
1092
|
-
resume("next", value);
|
|
1093
|
-
}
|
|
1094
|
-
function reject(value) {
|
|
1095
|
-
resume("throw", value);
|
|
1096
|
-
}
|
|
1097
|
-
function settle(f, v) {
|
|
1098
|
-
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
1099
|
-
}
|
|
1100
|
-
};
|
|
1101
|
-
/**
|
|
1102
|
-
* Create a Transport for the Connect protocol, which makes unary and
|
|
1103
|
-
* server-streaming methods available to web browsers. It uses the fetch
|
|
1104
|
-
* API to make HTTP requests.
|
|
1105
|
-
*/
|
|
1106
|
-
function createConnectTransport(options) {
|
|
1107
|
-
var _a;
|
|
1108
|
-
assertFetchApi();
|
|
1109
|
-
const useBinaryFormat = (_a = options.useBinaryFormat) !== null && _a !== void 0 ? _a : false;
|
|
1110
|
-
return {
|
|
1111
|
-
async unary(service, method, signal, timeoutMs, header, message, contextValues) {
|
|
1112
|
-
var _a;
|
|
1113
|
-
const { serialize, parse } = createClientMethodSerializers(method, useBinaryFormat, options.jsonOptions, options.binaryOptions);
|
|
1114
|
-
timeoutMs = timeoutMs === void 0 ? options.defaultTimeoutMs : timeoutMs <= 0 ? void 0 : timeoutMs;
|
|
1115
|
-
return await runUnaryCall({
|
|
1116
|
-
interceptors: options.interceptors,
|
|
1117
|
-
signal,
|
|
1118
|
-
timeoutMs,
|
|
1119
|
-
req: {
|
|
1120
|
-
stream: false,
|
|
1121
|
-
service,
|
|
1122
|
-
method,
|
|
1123
|
-
url: createMethodUrl(options.baseUrl, service, method),
|
|
1124
|
-
init: {
|
|
1125
|
-
method: "POST",
|
|
1126
|
-
credentials: (_a = options.credentials) !== null && _a !== void 0 ? _a : "same-origin",
|
|
1127
|
-
redirect: "error",
|
|
1128
|
-
mode: "cors"
|
|
1129
|
-
},
|
|
1130
|
-
header: requestHeader$1(method.kind, useBinaryFormat, timeoutMs, header, false),
|
|
1131
|
-
contextValues: contextValues !== null && contextValues !== void 0 ? contextValues : createContextValues(),
|
|
1132
|
-
message
|
|
1133
|
-
},
|
|
1134
|
-
next: async (req) => {
|
|
1135
|
-
var _a;
|
|
1136
|
-
const useGet = options.useHttpGet === true && method.idempotency === MethodIdempotency.NoSideEffects;
|
|
1137
|
-
let body = null;
|
|
1138
|
-
if (useGet) req = transformConnectPostToGetRequest(req, serialize(req.message), useBinaryFormat);
|
|
1139
|
-
else body = serialize(req.message);
|
|
1140
|
-
const response = await ((_a = options.fetch) !== null && _a !== void 0 ? _a : globalThis.fetch)(req.url, Object.assign(Object.assign({}, req.init), {
|
|
1141
|
-
headers: req.header,
|
|
1142
|
-
signal: req.signal,
|
|
1143
|
-
body
|
|
1144
|
-
}));
|
|
1145
|
-
const { isUnaryError, unaryError } = validateResponse$1(method.kind, useBinaryFormat, response.status, response.headers);
|
|
1146
|
-
if (isUnaryError) throw errorFromJson(await response.json(), appendHeaders(...trailerDemux(response.headers)), unaryError);
|
|
1147
|
-
const [demuxedHeader, demuxedTrailer] = trailerDemux(response.headers);
|
|
1148
|
-
return {
|
|
1149
|
-
stream: false,
|
|
1150
|
-
service,
|
|
1151
|
-
method,
|
|
1152
|
-
header: demuxedHeader,
|
|
1153
|
-
message: useBinaryFormat ? parse(new Uint8Array(await response.arrayBuffer())) : method.O.fromJson(await response.json(), getJsonOptions(options.jsonOptions)),
|
|
1154
|
-
trailer: demuxedTrailer
|
|
1155
|
-
};
|
|
1156
|
-
}
|
|
1157
|
-
});
|
|
1158
|
-
},
|
|
1159
|
-
async stream(service, method, signal, timeoutMs, header, input, contextValues) {
|
|
1160
|
-
var _a;
|
|
1161
|
-
const { serialize, parse } = createClientMethodSerializers(method, useBinaryFormat, options.jsonOptions, options.binaryOptions);
|
|
1162
|
-
function parseResponseBody(body, trailerTarget, header, signal) {
|
|
1163
|
-
return __asyncGenerator$1(this, arguments, function* parseResponseBody_1() {
|
|
1164
|
-
const reader = createEnvelopeReadableStream(body).getReader();
|
|
1165
|
-
let endStreamReceived = false;
|
|
1166
|
-
for (;;) {
|
|
1167
|
-
const result = yield __await$1(reader.read());
|
|
1168
|
-
if (result.done) break;
|
|
1169
|
-
const { flags, data } = result.value;
|
|
1170
|
-
if ((flags & 1) === 1) throw new ConnectError(`protocol error: received unsupported compressed output`, Code.Internal);
|
|
1171
|
-
if ((flags & 2) === 2) {
|
|
1172
|
-
endStreamReceived = true;
|
|
1173
|
-
const endStream = endStreamFromJson(data);
|
|
1174
|
-
if (endStream.error) {
|
|
1175
|
-
const error = endStream.error;
|
|
1176
|
-
header.forEach((value, key) => {
|
|
1177
|
-
error.metadata.append(key, value);
|
|
1178
|
-
});
|
|
1179
|
-
throw error;
|
|
1180
|
-
}
|
|
1181
|
-
endStream.metadata.forEach((value, key) => trailerTarget.set(key, value));
|
|
1182
|
-
continue;
|
|
1183
|
-
}
|
|
1184
|
-
yield yield __await$1(parse(data));
|
|
1185
|
-
}
|
|
1186
|
-
if ("throwIfAborted" in signal) signal.throwIfAborted();
|
|
1187
|
-
if (!endStreamReceived) throw "missing EndStreamResponse";
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
async function createRequestBody(input) {
|
|
1191
|
-
if (method.kind != MethodKind.ServerStreaming) throw "The fetch API does not support streaming request bodies";
|
|
1192
|
-
const r = await input[Symbol.asyncIterator]().next();
|
|
1193
|
-
if (r.done == true) throw "missing request message";
|
|
1194
|
-
return encodeEnvelope(0, serialize(r.value));
|
|
1195
|
-
}
|
|
1196
|
-
timeoutMs = timeoutMs === void 0 ? options.defaultTimeoutMs : timeoutMs <= 0 ? void 0 : timeoutMs;
|
|
1197
|
-
return await runStreamingCall({
|
|
1198
|
-
interceptors: options.interceptors,
|
|
1199
|
-
timeoutMs,
|
|
1200
|
-
signal,
|
|
1201
|
-
req: {
|
|
1202
|
-
stream: true,
|
|
1203
|
-
service,
|
|
1204
|
-
method,
|
|
1205
|
-
url: createMethodUrl(options.baseUrl, service, method),
|
|
1206
|
-
init: {
|
|
1207
|
-
method: "POST",
|
|
1208
|
-
credentials: (_a = options.credentials) !== null && _a !== void 0 ? _a : "same-origin",
|
|
1209
|
-
redirect: "error",
|
|
1210
|
-
mode: "cors"
|
|
1211
|
-
},
|
|
1212
|
-
header: requestHeader$1(method.kind, useBinaryFormat, timeoutMs, header, false),
|
|
1213
|
-
contextValues: contextValues !== null && contextValues !== void 0 ? contextValues : createContextValues(),
|
|
1214
|
-
message: input
|
|
1215
|
-
},
|
|
1216
|
-
next: async (req) => {
|
|
1217
|
-
var _a;
|
|
1218
|
-
const fRes = await ((_a = options.fetch) !== null && _a !== void 0 ? _a : globalThis.fetch)(req.url, Object.assign(Object.assign({}, req.init), {
|
|
1219
|
-
headers: req.header,
|
|
1220
|
-
signal: req.signal,
|
|
1221
|
-
body: await createRequestBody(req.message)
|
|
1222
|
-
}));
|
|
1223
|
-
validateResponse$1(method.kind, useBinaryFormat, fRes.status, fRes.headers);
|
|
1224
|
-
if (fRes.body === null) throw "missing response body";
|
|
1225
|
-
const trailer = new Headers();
|
|
1226
|
-
return Object.assign(Object.assign({}, req), {
|
|
1227
|
-
header: fRes.headers,
|
|
1228
|
-
trailer,
|
|
1229
|
-
message: parseResponseBody(fRes.body, trailer, fRes.headers, req.signal)
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
|
-
}
|
|
1236
|
-
//#endregion
|
|
1237
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/validate-trailer.js
|
|
1238
|
-
/**
|
|
1239
|
-
* Validates a trailer for the gRPC and the gRPC-web protocol.
|
|
1240
|
-
*
|
|
1241
|
-
* If the trailer contains an error status, a ConnectError is
|
|
1242
|
-
* thrown. It will include trailer and header in the error's
|
|
1243
|
-
* "metadata" property.
|
|
1244
|
-
*
|
|
1245
|
-
* Throws a ConnectError with code "internal" if neither the trailer
|
|
1246
|
-
* nor the header contain the Grpc-Status field.
|
|
1247
|
-
*
|
|
1248
|
-
* @private Internal code, does not follow semantic versioning.
|
|
1249
|
-
*/
|
|
1250
|
-
function validateTrailer(trailer, header) {
|
|
1251
|
-
const err = findTrailerError(trailer);
|
|
1252
|
-
if (err) {
|
|
1253
|
-
header.forEach((value, key) => {
|
|
1254
|
-
err.metadata.append(key, value);
|
|
1255
|
-
});
|
|
1256
|
-
throw err;
|
|
1257
|
-
}
|
|
1258
|
-
if (!header.has("Grpc-Status") && !trailer.has("Grpc-Status")) throw new ConnectError("protocol error: missing status", Code.Internal);
|
|
1259
|
-
}
|
|
1260
|
-
//#endregion
|
|
1261
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/request-header.js
|
|
1262
|
-
/**
|
|
1263
|
-
* Creates headers for a gRPC-web request.
|
|
1264
|
-
*
|
|
1265
|
-
* @private Internal code, does not follow semantic versioning.
|
|
1266
|
-
*/
|
|
1267
|
-
function requestHeader(useBinaryFormat, timeoutMs, userProvidedHeaders, setUserAgent) {
|
|
1268
|
-
var _a, _b;
|
|
1269
|
-
const result = new Headers(userProvidedHeaders !== null && userProvidedHeaders !== void 0 ? userProvidedHeaders : {});
|
|
1270
|
-
result.set(headerContentType$1, useBinaryFormat ? contentTypeProto : contentTypeJson);
|
|
1271
|
-
result.set(headerXGrpcWeb, "1");
|
|
1272
|
-
const userAgent = (_b = (_a = result.get("User-Agent")) !== null && _a !== void 0 ? _a : result.get("X-User-Agent")) !== null && _b !== void 0 ? _b : "connect-es/1.7.0";
|
|
1273
|
-
result.set(headerXUserAgent, userAgent);
|
|
1274
|
-
if (setUserAgent) result.set(headerUserAgent$1, userAgent);
|
|
1275
|
-
if (timeoutMs !== void 0) result.set(headerTimeout$1, `${timeoutMs}m`);
|
|
1276
|
-
return result;
|
|
1277
|
-
}
|
|
1278
|
-
//#endregion
|
|
1279
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc/http-status.js
|
|
1280
|
-
/**
|
|
1281
|
-
* Determine the gRPC-web error code for the given HTTP status code.
|
|
1282
|
-
* See https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md.
|
|
1283
|
-
*
|
|
1284
|
-
* @private Internal code, does not follow semantic versioning.
|
|
1285
|
-
*/
|
|
1286
|
-
function codeFromHttpStatus(httpStatus) {
|
|
1287
|
-
switch (httpStatus) {
|
|
1288
|
-
case 400: return Code.Internal;
|
|
1289
|
-
case 401: return Code.Unauthenticated;
|
|
1290
|
-
case 403: return Code.PermissionDenied;
|
|
1291
|
-
case 404: return Code.Unimplemented;
|
|
1292
|
-
case 429: return Code.Unavailable;
|
|
1293
|
-
case 502: return Code.Unavailable;
|
|
1294
|
-
case 503: return Code.Unavailable;
|
|
1295
|
-
case 504: return Code.Unavailable;
|
|
1296
|
-
default: return Code.Unknown;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
//#endregion
|
|
1300
|
-
//#region node_modules/.pnpm/@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0/node_modules/@connectrpc/connect/dist/esm/protocol-grpc-web/validate-response.js
|
|
1301
|
-
/**
|
|
1302
|
-
* Validates response status and header for the gRPC-web protocol.
|
|
1303
|
-
*
|
|
1304
|
-
* Throws a ConnectError if the header contains an error status,
|
|
1305
|
-
* or if the HTTP status indicates an error.
|
|
1306
|
-
*
|
|
1307
|
-
* Returns an object that indicates whether a gRPC status was found
|
|
1308
|
-
* in the response header. In this case, clients can not expect a
|
|
1309
|
-
* trailer.
|
|
1310
|
-
*
|
|
1311
|
-
* @private Internal code, does not follow semantic versioning.
|
|
1312
|
-
*/
|
|
1313
|
-
function validateResponse(status, headers) {
|
|
1314
|
-
var _a;
|
|
1315
|
-
if (status >= 200 && status < 300) return {
|
|
1316
|
-
foundStatus: headers.has(headerGrpcStatus),
|
|
1317
|
-
headerError: findTrailerError(headers)
|
|
1318
|
-
};
|
|
1319
|
-
throw new ConnectError(decodeURIComponent((_a = headers.get("Grpc-Message")) !== null && _a !== void 0 ? _a : `HTTP ${status}`), codeFromHttpStatus(status), headers);
|
|
1320
|
-
}
|
|
1321
|
-
//#endregion
|
|
1322
|
-
//#region node_modules/.pnpm/@connectrpc+connect-web@1.7.0_@bufbuild+protobuf@1.10.0_@connectrpc+connect@1.7.0_@bufbuild+protobuf@1.10.0_/node_modules/@connectrpc/connect-web/dist/esm/grpc-web-transport.js
|
|
1323
|
-
var __await = function(v) {
|
|
1324
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
1325
|
-
};
|
|
1326
|
-
var __asyncGenerator = function(thisArg, _arguments, generator) {
|
|
1327
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
1328
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1329
|
-
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
1330
|
-
return this;
|
|
1331
|
-
}, i;
|
|
1332
|
-
function awaitReturn(f) {
|
|
1333
|
-
return function(v) {
|
|
1334
|
-
return Promise.resolve(v).then(f, reject);
|
|
1335
|
-
};
|
|
1336
|
-
}
|
|
1337
|
-
function verb(n, f) {
|
|
1338
|
-
if (g[n]) {
|
|
1339
|
-
i[n] = function(v) {
|
|
1340
|
-
return new Promise(function(a, b) {
|
|
1341
|
-
q.push([
|
|
1342
|
-
n,
|
|
1343
|
-
v,
|
|
1344
|
-
a,
|
|
1345
|
-
b
|
|
1346
|
-
]) > 1 || resume(n, v);
|
|
1347
|
-
});
|
|
1348
|
-
};
|
|
1349
|
-
if (f) i[n] = f(i[n]);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
function resume(n, v) {
|
|
1353
|
-
try {
|
|
1354
|
-
step(g[n](v));
|
|
1355
|
-
} catch (e) {
|
|
1356
|
-
settle(q[0][3], e);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
function step(r) {
|
|
1360
|
-
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
1361
|
-
}
|
|
1362
|
-
function fulfill(value) {
|
|
1363
|
-
resume("next", value);
|
|
1364
|
-
}
|
|
1365
|
-
function reject(value) {
|
|
1366
|
-
resume("throw", value);
|
|
1367
|
-
}
|
|
1368
|
-
function settle(f, v) {
|
|
1369
|
-
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
|
-
/**
|
|
1373
|
-
* Create a Transport for the gRPC-web protocol. The protocol encodes
|
|
1374
|
-
* trailers in the response body and makes unary and server-streaming
|
|
1375
|
-
* methods available to web browsers. It uses the fetch API to make
|
|
1376
|
-
* HTTP requests.
|
|
1377
|
-
*
|
|
1378
|
-
* Note that this transport does not implement the grpc-web-text format,
|
|
1379
|
-
* which applies base64 encoding to the request and response bodies to
|
|
1380
|
-
* support reading streaming responses from an XMLHttpRequest.
|
|
1381
|
-
*/
|
|
1382
|
-
function createGrpcWebTransport(options) {
|
|
1383
|
-
var _a;
|
|
1384
|
-
assertFetchApi();
|
|
1385
|
-
const useBinaryFormat = (_a = options.useBinaryFormat) !== null && _a !== void 0 ? _a : true;
|
|
1386
|
-
return {
|
|
1387
|
-
async unary(service, method, signal, timeoutMs, header, message, contextValues) {
|
|
1388
|
-
var _a;
|
|
1389
|
-
const { serialize, parse } = createClientMethodSerializers(method, useBinaryFormat, options.jsonOptions, options.binaryOptions);
|
|
1390
|
-
timeoutMs = timeoutMs === void 0 ? options.defaultTimeoutMs : timeoutMs <= 0 ? void 0 : timeoutMs;
|
|
1391
|
-
return await runUnaryCall({
|
|
1392
|
-
interceptors: options.interceptors,
|
|
1393
|
-
signal,
|
|
1394
|
-
timeoutMs,
|
|
1395
|
-
req: {
|
|
1396
|
-
stream: false,
|
|
1397
|
-
service,
|
|
1398
|
-
method,
|
|
1399
|
-
url: createMethodUrl(options.baseUrl, service, method),
|
|
1400
|
-
init: {
|
|
1401
|
-
method: "POST",
|
|
1402
|
-
credentials: (_a = options.credentials) !== null && _a !== void 0 ? _a : "same-origin",
|
|
1403
|
-
redirect: "error",
|
|
1404
|
-
mode: "cors"
|
|
1405
|
-
},
|
|
1406
|
-
header: requestHeader(useBinaryFormat, timeoutMs, header, false),
|
|
1407
|
-
contextValues: contextValues !== null && contextValues !== void 0 ? contextValues : createContextValues(),
|
|
1408
|
-
message
|
|
1409
|
-
},
|
|
1410
|
-
next: async (req) => {
|
|
1411
|
-
var _a;
|
|
1412
|
-
const response = await ((_a = options.fetch) !== null && _a !== void 0 ? _a : globalThis.fetch)(req.url, Object.assign(Object.assign({}, req.init), {
|
|
1413
|
-
headers: req.header,
|
|
1414
|
-
signal: req.signal,
|
|
1415
|
-
body: encodeEnvelope(0, serialize(req.message))
|
|
1416
|
-
}));
|
|
1417
|
-
const { headerError } = validateResponse(response.status, response.headers);
|
|
1418
|
-
if (!response.body) {
|
|
1419
|
-
if (headerError !== void 0) throw headerError;
|
|
1420
|
-
throw "missing response body";
|
|
1421
|
-
}
|
|
1422
|
-
const reader = createEnvelopeReadableStream(response.body).getReader();
|
|
1423
|
-
let trailer;
|
|
1424
|
-
let message;
|
|
1425
|
-
for (;;) {
|
|
1426
|
-
const r = await reader.read();
|
|
1427
|
-
if (r.done) break;
|
|
1428
|
-
const { flags, data } = r.value;
|
|
1429
|
-
if ((flags & 1) === 1) throw new ConnectError(`protocol error: received unsupported compressed output`, Code.Internal);
|
|
1430
|
-
if (flags === 128) {
|
|
1431
|
-
if (trailer !== void 0) throw "extra trailer";
|
|
1432
|
-
trailer = trailerParse(data);
|
|
1433
|
-
continue;
|
|
1434
|
-
}
|
|
1435
|
-
if (message !== void 0) throw new ConnectError("extra message", Code.Unimplemented);
|
|
1436
|
-
message = parse(data);
|
|
1437
|
-
}
|
|
1438
|
-
if (trailer === void 0) {
|
|
1439
|
-
if (headerError !== void 0) throw headerError;
|
|
1440
|
-
throw new ConnectError("missing trailer", response.headers.has("Grpc-Status") ? Code.Unimplemented : Code.Unknown);
|
|
1441
|
-
}
|
|
1442
|
-
validateTrailer(trailer, response.headers);
|
|
1443
|
-
if (message === void 0) throw new ConnectError("missing message", trailer.has("Grpc-Status") ? Code.Unimplemented : Code.Unknown);
|
|
1444
|
-
return {
|
|
1445
|
-
stream: false,
|
|
1446
|
-
service,
|
|
1447
|
-
method,
|
|
1448
|
-
header: response.headers,
|
|
1449
|
-
message,
|
|
1450
|
-
trailer
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
});
|
|
1454
|
-
},
|
|
1455
|
-
async stream(service, method, signal, timeoutMs, header, input, contextValues) {
|
|
1456
|
-
var _a;
|
|
1457
|
-
const { serialize, parse } = createClientMethodSerializers(method, useBinaryFormat, options.jsonOptions, options.binaryOptions);
|
|
1458
|
-
function parseResponseBody(body, foundStatus, trailerTarget, header, signal) {
|
|
1459
|
-
return __asyncGenerator(this, arguments, function* parseResponseBody_1() {
|
|
1460
|
-
const reader = createEnvelopeReadableStream(body).getReader();
|
|
1461
|
-
if (foundStatus) {
|
|
1462
|
-
if (!(yield __await(reader.read())).done) throw "extra data for trailers-only";
|
|
1463
|
-
return yield __await(void 0);
|
|
1464
|
-
}
|
|
1465
|
-
let trailerReceived = false;
|
|
1466
|
-
for (;;) {
|
|
1467
|
-
const result = yield __await(reader.read());
|
|
1468
|
-
if (result.done) break;
|
|
1469
|
-
const { flags, data } = result.value;
|
|
1470
|
-
if ((flags & 128) === 128) {
|
|
1471
|
-
if (trailerReceived) throw "extra trailer";
|
|
1472
|
-
trailerReceived = true;
|
|
1473
|
-
const trailer = trailerParse(data);
|
|
1474
|
-
validateTrailer(trailer, header);
|
|
1475
|
-
trailer.forEach((value, key) => trailerTarget.set(key, value));
|
|
1476
|
-
continue;
|
|
1477
|
-
}
|
|
1478
|
-
if (trailerReceived) throw "extra message";
|
|
1479
|
-
yield yield __await(parse(data));
|
|
1480
|
-
}
|
|
1481
|
-
if ("throwIfAborted" in signal) signal.throwIfAborted();
|
|
1482
|
-
if (!trailerReceived) throw "missing trailer";
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
|
-
async function createRequestBody(input) {
|
|
1486
|
-
if (method.kind != MethodKind.ServerStreaming) throw "The fetch API does not support streaming request bodies";
|
|
1487
|
-
const r = await input[Symbol.asyncIterator]().next();
|
|
1488
|
-
if (r.done == true) throw "missing request message";
|
|
1489
|
-
return encodeEnvelope(0, serialize(r.value));
|
|
1490
|
-
}
|
|
1491
|
-
timeoutMs = timeoutMs === void 0 ? options.defaultTimeoutMs : timeoutMs <= 0 ? void 0 : timeoutMs;
|
|
1492
|
-
return runStreamingCall({
|
|
1493
|
-
interceptors: options.interceptors,
|
|
1494
|
-
signal,
|
|
1495
|
-
timeoutMs,
|
|
1496
|
-
req: {
|
|
1497
|
-
stream: true,
|
|
1498
|
-
service,
|
|
1499
|
-
method,
|
|
1500
|
-
url: createMethodUrl(options.baseUrl, service, method),
|
|
1501
|
-
init: {
|
|
1502
|
-
method: "POST",
|
|
1503
|
-
credentials: (_a = options.credentials) !== null && _a !== void 0 ? _a : "same-origin",
|
|
1504
|
-
redirect: "error",
|
|
1505
|
-
mode: "cors"
|
|
1506
|
-
},
|
|
1507
|
-
header: requestHeader(useBinaryFormat, timeoutMs, header, false),
|
|
1508
|
-
contextValues: contextValues !== null && contextValues !== void 0 ? contextValues : createContextValues(),
|
|
1509
|
-
message: input
|
|
1510
|
-
},
|
|
1511
|
-
next: async (req) => {
|
|
1512
|
-
var _a;
|
|
1513
|
-
const fRes = await ((_a = options.fetch) !== null && _a !== void 0 ? _a : globalThis.fetch)(req.url, Object.assign(Object.assign({}, req.init), {
|
|
1514
|
-
headers: req.header,
|
|
1515
|
-
signal: req.signal,
|
|
1516
|
-
body: await createRequestBody(req.message)
|
|
1517
|
-
}));
|
|
1518
|
-
const { foundStatus, headerError } = validateResponse(fRes.status, fRes.headers);
|
|
1519
|
-
if (headerError != void 0) throw headerError;
|
|
1520
|
-
if (!fRes.body) throw "missing response body";
|
|
1521
|
-
const trailer = new Headers();
|
|
1522
|
-
return Object.assign(Object.assign({}, req), {
|
|
1523
|
-
header: fRes.headers,
|
|
1524
|
-
trailer,
|
|
1525
|
-
message: parseResponseBody(fRes.body, foundStatus, trailer, fRes.headers, req.signal)
|
|
1526
|
-
});
|
|
1527
|
-
}
|
|
1528
|
-
});
|
|
1529
|
-
}
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
|
-
//#endregion
|
|
1533
|
-
export { createConnectTransport, createGrpcWebTransport };
|