decocms 2.314.0 → 2.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-7o1P0zzm.js → AlertCircle-DBo9AAMH.js} +1 -1
- package/dist/client/assets/{Archive-DSPPL-j9.js → Archive-DmnBOtki.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-qDflnb8N.js → ArrowNarrowLeft-deV6RKN9.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C3mm8yK_.js → ArrowUpRight-CyleC_fI.js} +1 -1
- package/dist/client/assets/{Check-Dz5ZLQmL.js → Check-CWMsutx6.js} +1 -1
- package/dist/client/assets/{CheckCircle-A2guVcAG.js → CheckCircle-CtqrLFo6.js} +1 -1
- package/dist/client/assets/{ChevronDown-Bau6LlOi.js → ChevronDown-DBDCamK8.js} +1 -1
- package/dist/client/assets/{ChevronRight-ChQ95U2k.js → ChevronRight-D0Db_yfd.js} +1 -1
- package/dist/client/assets/{ChevronUp-COL031vn.js → ChevronUp-Dx3CWQDk.js} +1 -1
- package/dist/client/assets/{Container-BcMn23kd.js → Container-RAn51RkG.js} +1 -1
- package/dist/client/assets/{DotsVertical-CII1YBBc.js → DotsVertical-D9jz1TQ0.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BCU3zX1U.js → LayoutLeft-Bz-byvkb.js} +1 -1
- package/dist/client/assets/{LinkExternal01-oqIx4SAa.js → LinkExternal01-C0Smk2lu.js} +1 -1
- package/dist/client/assets/{Lock01-CJ14jIMg.js → Lock01-IggrtR3m.js} +1 -1
- package/dist/client/assets/{Palette-g_FAi23c.js → Palette-Cg9Tm5aJ.js} +1 -1
- package/dist/client/assets/{Play-BZl-q_yI.js → Play-DW0LITiR.js} +1 -1
- package/dist/client/assets/{Plus-CKCuUTsd.js → Plus-Dhbk7Oxt.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-8Ibm16Pu.js → RefreshCcw01-CIoWX0oI.js} +1 -1
- package/dist/client/assets/{SearchMd-AJN6VuJg.js → SearchMd-1jGzATDG.js} +1 -1
- package/dist/client/assets/{Settings02-CDcaxP04.js → Settings02-DRIFxfHn.js} +1 -1
- package/dist/client/assets/{Shield01-D1Hywoy5.js → Shield01-5EtEh1c3.js} +1 -1
- package/dist/client/assets/{Star01-BcHjnr98.js → Star01-B3h6tOF6.js} +1 -1
- package/dist/client/assets/{Sun-hliFotLP.js → Sun-CkFgevjR.js} +1 -1
- package/dist/client/assets/{Tool01-bqF4BUeR.js → Tool01-D-ahtGaO.js} +1 -1
- package/dist/client/assets/{Trash01-BqVS-Vu_.js → Trash01-BERBzkhG.js} +1 -1
- package/dist/client/assets/{User01-B9MhRcqZ.js → User01-DHE4nBvX.js} +1 -1
- package/dist/client/assets/{Users03-oWGgz1_B.js → Users03-Cy-1ZCAV.js} +1 -1
- package/dist/client/assets/{X-Bs68LwBc.js → X-C1OoauoK.js} +1 -1
- package/dist/client/assets/{XCircle-H0Nc2jh5.js → XCircle-pEn9ROt8.js} +1 -1
- package/dist/client/assets/{XClose-Cilpzhqm.js → XClose-DzM42Vw-.js} +1 -1
- package/dist/client/assets/{Zap-DhYtqMa9.js → Zap-BNWDUN_3.js} +1 -1
- package/dist/client/assets/{ZapSquare-BmqW5YQ-.js → ZapSquare-D1rioSCt.js} +1 -1
- package/dist/client/assets/{accordion-CfzkzHFA.js → accordion-pCBdHp9x.js} +1 -1
- package/dist/client/assets/{agent-icon-kpWVPj85.js → agent-icon-uifQLn7r.js} +1 -1
- package/dist/client/assets/{agents-list-GApGpFoC.js → agents-list-BdIIZeGh.js} +1 -1
- package/dist/client/assets/ai-providers-Bhh9Y6Dv.js +1 -0
- package/dist/client/assets/{alert-dialog-DS13tR4C.js → alert-dialog-BkIzeg-f.js} +1 -1
- package/dist/client/assets/{auth-catchall-qIi1Yg3W.js → auth-catchall-Dk7BbFKA.js} +1 -1
- package/dist/client/assets/{automation-list-row-B5q6RXF7.js → automation-list-row-Bvgyi-LF.js} +1 -1
- package/dist/client/assets/{automations-C6LU_2_K.js → automations-CY-zZERQ.js} +1 -1
- package/dist/client/assets/{avatar-CmUFzi3F.js → avatar-Cz46we3J.js} +1 -1
- package/dist/client/assets/{badge-DTxL6xUH.js → badge-DlK7sduG.js} +1 -1
- package/dist/client/assets/{brand-context-CTWUekUV.js → brand-context-jzzqwWBQ.js} +1 -1
- package/dist/client/assets/{card-D-Cbo6xY.js → card-2xC00NeJ.js} +1 -1
- package/dist/client/assets/{chat-context-CdZvecT8.js → chat-context-ByfbtfrN.js} +1 -1
- package/dist/client/assets/{checkbox-DMz97A6W.js → checkbox-DsgKhADc.js} +1 -1
- package/dist/client/assets/{collection-detail-BfdHOcH7.js → collection-detail-C56pcSau.js} +1 -1
- package/dist/client/assets/{collection-display-button-CbYIYYup.js → collection-display-button-CI5u7nQD.js} +1 -1
- package/dist/client/assets/{collection-search-B43ATSBX.js → collection-search-NHcUUFC9.js} +1 -1
- package/dist/client/assets/{collection-search-DcN3WCBc.js → collection-search-yy57Ug8m.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-ChYShKZS.js → collection-table-wrapper-qcm_l5Ey.js} +1 -1
- package/dist/client/assets/{collection-tabs-BygOMFvP.js → collection-tabs-CXdaxoaN.js} +1 -1
- package/dist/client/assets/{collections-BxKz1gM7.js → collections-Cjw9obtS.js} +1 -1
- package/dist/client/assets/{command-Bkkhvz88.js → command-DRyumRWB.js} +1 -1
- package/dist/client/assets/{connection-card-DwuPCVad.js → connection-card-Dk55kTl8.js} +1 -1
- package/dist/client/assets/{connection-detail-CrK0sm-c.js → connection-detail-DUP91Ojg.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Zh2UA8De.js → connection-form-helpers-CyAEGoC0.js} +1 -1
- package/dist/client/assets/{connections-DjYU3SLo.js → connections-BOqrnzGe.js} +1 -1
- package/dist/client/assets/{constants-ZaDhARcT.js → constants-BayN-yld.js} +1 -1
- package/dist/client/assets/{constants-Pxhsjio1.js → constants-DB87On7u.js} +1 -1
- package/dist/client/assets/{dialog-C_Z_peKj.js → dialog-DwOIY1UM.js} +1 -1
- package/dist/client/assets/{domain-settings-9OZffLbB.js → domain-settings-15c_0wEz.js} +1 -1
- package/dist/client/assets/{drawer-Zoq78wzr.js → drawer-C_2I8f4S.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D2TItq8w.js → dropdown-menu-CjlIX0cw.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BNQeiFD-.js → dynamic-plugin-layout-DYFXKOHu.js} +1 -1
- package/dist/client/assets/{empty-state-Nd37WS0U.js → empty-state-BBQwipf0.js} +1 -1
- package/dist/client/assets/{empty-state-DmNyyTs_.js → empty-state-CJUpyycw.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BrLjI2XN.js → extract-connection-data-CXWvMJKK.js} +1 -1
- package/dist/client/assets/{features-BMBXNzKR.js → features-B2B8fUD_.js} +1 -1
- package/dist/client/assets/{form-CHyUU2aZ.js → form-DuX6xbr5.js} +1 -1
- package/dist/client/assets/{general-BmNgsifZ.js → general-B3K7KcXe.js} +1 -1
- package/dist/client/assets/{index-4JTQs1c6.js → index-5CBkac_m.js} +1 -1
- package/dist/client/assets/{index-DNKOi0uM.js → index-BSQ56kKS.js} +1 -1
- package/dist/client/assets/{index-CzeuUc9U.css → index-Bo94M6wo.css} +1 -1
- package/dist/client/assets/{index-CKMzeZJu.js → index-Bs9l9sgs.js} +1 -1
- package/dist/client/assets/{index-DlEamKDn.js → index-C1tCttKh.js} +1 -1
- package/dist/client/assets/{index-IoVTnIlz.js → index-COMOhhst.js} +1 -1
- package/dist/client/assets/{index-LSlqVMbE.js → index-CodtVFa8.js} +1 -1
- package/dist/client/assets/{index-CNLaZeow.js → index-CpI01aVT.js} +1 -1
- package/dist/client/assets/{index-Br-Caa-t.js → index-CsD6nKsw.js} +3 -3
- package/dist/client/assets/{index-DILJMZJ-.js → index-D4K9PTQn.js} +1 -1
- package/dist/client/assets/{index-C677F7dG.js → index-DGUC54zs.js} +1 -1
- package/dist/client/assets/{index-CSmi-vs_.js → index-DOcAAsz8.js} +1 -1
- package/dist/client/assets/{index-lom4XGsv.js → index-DnB8sRlu.js} +1 -1
- package/dist/client/assets/{index-Ci4MsFGg.js → index-DyvHytn-.js} +1 -1
- package/dist/client/assets/{index-C98EzEx6.js → index-KerpDg0f.js} +1 -1
- package/dist/client/assets/{index-C_yGpzc7.js → index-iV247muO.js} +1 -1
- package/dist/client/assets/{index-DTTgUjL4.js → index-z6P4iLmn.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-B091eeMg.js → infiniteQueryObserver-DG4oU5QG.js} +1 -1
- package/dist/client/assets/{input-CjWKkTcV.js → input-DDq-8B8D.js} +1 -1
- package/dist/client/assets/{integration-icon-Daxcsp7E.js → integration-icon-nAICH2vf.js} +1 -1
- package/dist/client/assets/{label-CuUYxm88.js → label-Bkzo9n9W.js} +1 -1
- package/dist/client/assets/{layout-BeSp3Oh9.js → layout-hGgp6KcA.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CwFVPVmY.js → lean-canvas-recruit-modal-Caab3ket.js} +1 -1
- package/dist/client/assets/{login-B9iFfUWB.js → login-DrUu9CAR.js} +1 -1
- package/dist/client/assets/{members-jW5-cfkB.js → members-B4BgapXa.js} +1 -1
- package/dist/client/assets/{monaco-editor-D_4gsArT.js → monaco-editor-Cf3iDvFI.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cd380L7N.js → monitoring-stats-row-BKSo1B8N.js} +1 -1
- package/dist/client/assets/{oauth-callback-BIIrmyR_.js → oauth-callback-C4APhxln.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Ct3x9lXY.js → oauth-callback-ai-provider-DqU9borq.js} +1 -1
- package/dist/client/assets/{onboarding-P0GSgrOf.js → onboarding-CWGzEGrE.js} +1 -1
- package/dist/client/assets/{org-layout-BJJDusCD.js → org-layout-CH2BSz6a.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-Ds6qy0vM.js → org-plugin-layout-BoB21QNL.js} +1 -1
- package/dist/client/assets/{pair-BFx5Qm41.js → pair-CsA-kA9X.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-RSWe6UFb.js → plugin-empty-state-BQLMlF6o.js} +1 -1
- package/dist/client/assets/{plugin-header-CZW0YM31.js → plugin-header-DSRM-4yQ.js} +1 -1
- package/dist/client/assets/{plugin-layout-CKQPXqV_.js → plugin-layout-0l5aE9yu.js} +1 -1
- package/dist/client/assets/{popover-BsaIAZff.js → popover-D1LgcRgW.js} +1 -1
- package/dist/client/assets/{profile-DZGaisjJ.js → profile-_LtgicDY.js} +1 -1
- package/dist/client/assets/{project-app-view-DrCNkPvv.js → project-app-view-DCmHXwRc.js} +1 -1
- package/dist/client/assets/registry-Cg9k50mz.js +2 -0
- package/dist/client/assets/{registry-layout-BRdqsUee.js → registry-layout-D1Oo5n4g.js} +1 -1
- package/dist/client/assets/{required-auth-layout-d6mCY6f7.js → required-auth-layout-_LlHFgAQ.js} +1 -1
- package/dist/client/assets/{reset-password-BJIcH7kI.js → reset-password-BH07s9g0.js} +1 -1
- package/dist/client/assets/{roles--r_o8-6E.js → roles-BweIAPZg.js} +1 -1
- package/dist/client/assets/{scroll-area-QdubrRQt.js → scroll-area-DRfh3y2I.js} +1 -1
- package/dist/client/assets/{search-input-DQThAugc.js → search-input-LHp6WbZ8.js} +1 -1
- package/dist/client/assets/{select-Bc7FbSIp.js → select-DEYcF0JB.js} +1 -1
- package/dist/client/assets/select-model-BbmvZEL_.js +4 -0
- package/dist/client/assets/{settings-layout-BELegTve.js → settings-layout-Dg-MbJa4.js} +1 -1
- package/dist/client/assets/{settings-section-9_iK7u6X.js → settings-section-CnKm_zFi.js} +1 -1
- package/dist/client/assets/{shell-layout-Dp5_NwRV.js → shell-layout-BrapIdet.js} +1 -1
- package/dist/client/assets/{sidebar-DhPirxvV.js → sidebar-B9xBBJwp.js} +1 -1
- package/dist/client/assets/{skeleton-eCg5poGw.js → skeleton-BAst9SOO.js} +1 -1
- package/dist/client/assets/{spinner-Dxocm3j_.js → spinner-rKXgQqAk.js} +1 -1
- package/dist/client/assets/{sso-B4IKwnqS.js → sso-DW-lKH8S.js} +1 -1
- package/dist/client/assets/{store-DaysWhlR.js → store-ChsblA-_.js} +1 -1
- package/dist/client/assets/store-registry-DgSs_75r.js +2 -0
- package/dist/client/assets/{switch-B8o7MEY9.js → switch-CxAZv9yX.js} +1 -1
- package/dist/client/assets/{table-DYiQpBVl.js → table-BN6PHtUf.js} +1 -1
- package/dist/client/assets/{tabs-BCMGnbuG.js → tabs-DiNALrC0.js} +1 -1
- package/dist/client/assets/{task-status-C_2rdQW8.js → task-status-Bu4uKZob.js} +1 -1
- package/dist/client/assets/{textarea-C8ZFrqCw.js → textarea-CaaYBEq5.js} +1 -1
- package/dist/client/assets/{toggle-group-C-cIsKer.js → toggle-group-CLzH7VcU.js} +1 -1
- package/dist/client/assets/{tools-list-KDjJD9bB.js → tools-list-Bb9DL4-R.js} +1 -1
- package/dist/client/assets/{tooltip-3OBm7oI6.js → tooltip-Bw2Gbk6i.js} +1 -1
- package/dist/client/assets/{types-D4WcWxjq.js → types-BDSwKXoZ.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DvE8tTc0.js → use-ai-providers-dNlKFItH.js} +1 -1
- package/dist/client/assets/{use-collections-B_AeR68F.js → use-collections-DwzrzR7x.js} +1 -1
- package/dist/client/assets/{use-connection-fL8Bdy-2.js → use-connection-Cs4MqZHR.js} +1 -1
- package/dist/client/assets/{use-copy-BH9cfEYN.js → use-copy-D_36SjQe.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-vUi8t55-.js → use-create-virtual-mcp-DklejMow.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-IcGCZv-N.js → use-debounced-autosave-ePDNWMLl.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-1cGHr_e6.js → use-decopilot-events-BSdLD1zv.js} +1 -1
- package/dist/client/assets/{use-delete-connection-an2fbIpK.js → use-delete-connection-CnJi1BUf.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BLSqYlPF.js → use-infinite-scroll-BsRyX00I.js} +1 -1
- package/dist/client/assets/{use-list-state-aza5fd_3.js → use-list-state-qXvm0Rn6.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B4pwuY-v.js → use-mcp-tools-Bdf0_v40.js} +1 -1
- package/dist/client/assets/{use-members-B1BsOSEO.js → use-members-Dy9f9-ET.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B-DziSLT.js → use-navigate-to-agent-_FHkP3HP.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CQ4fKhJD.js → use-org-auth-client-Cyg62sX1.js} +1 -1
- package/dist/client/assets/{use-org-sso-DLgTKJXm.js → use-org-sso-D9MJvQ_s.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CnVpqv0t.js → use-organization-roles-DtglihXA.js} +1 -1
- package/dist/client/assets/{use-organization-settings-F4a6zVGw.js → use-organization-settings-oGq90ndm.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Dqv2-jKJ.js → use-registry-connections-BM5hIh0Z.js} +1 -1
- package/dist/client/assets/{use-status-sounds-u8Owkhk7.js → use-status-sounds-D_payzk4.js} +1 -1
- package/dist/client/assets/{use-tasks-C1EcT2Me.js → use-tasks-DjLQLna-.js} +1 -1
- package/dist/client/assets/{use-view-mode-DRlYzhbj.js → use-view-mode-BOjU5oCn.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CjWnWBVR.js → use-virtual-mcp-D0R2VmhD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dssa7ddx.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-g1_E19Vj.js +1 -0
- package/dist/client/assets/{user-BO8smULi.js → user-DR-uev4E.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-0NgrTiKE.js → view-mode-toggle-87gK3y50.js} +1 -1
- package/dist/client/assets/{workflow-j8cOJEmO.js → workflow-CHq9DO6y.js} +1 -1
- package/dist/client/assets/workflow-detail-CoEWiVrM.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/{postgres-array/license → xtend/LICENSE} +1 -2
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-BUwxJWPA.js +0 -1
- package/dist/client/assets/registry-ckfqFSXi.js +0 -2
- package/dist/client/assets/select-model-wWpcRuqG.js +0 -4
- package/dist/client/assets/store-registry-Cy1BNsop.js +0 -2
- package/dist/client/assets/useInfiniteQuery-fBvMjRX2.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0lprudQ.js +0 -1
- package/dist/client/assets/workflow-detail-D1bP-LWr.js +0 -1
- package/dist/server/node_modules/pg-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/license +0 -21
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/license +0 -21
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
|
@@ -1,409 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const test = require('tape')
|
|
4
|
-
const split = require('./')
|
|
5
|
-
const callback = require('callback-stream')
|
|
6
|
-
const strcb = callback.bind(null, { decodeStrings: false })
|
|
7
|
-
const objcb = callback.bind(null, { objectMode: true })
|
|
8
|
-
|
|
9
|
-
test('split two lines on end', function (t) {
|
|
10
|
-
t.plan(2)
|
|
11
|
-
|
|
12
|
-
const input = split()
|
|
13
|
-
|
|
14
|
-
input.pipe(strcb(function (err, list) {
|
|
15
|
-
t.error(err)
|
|
16
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
17
|
-
}))
|
|
18
|
-
|
|
19
|
-
input.end('hello\nworld')
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
test('split two lines on two writes', function (t) {
|
|
23
|
-
t.plan(2)
|
|
24
|
-
|
|
25
|
-
const input = split()
|
|
26
|
-
|
|
27
|
-
input.pipe(strcb(function (err, list) {
|
|
28
|
-
t.error(err)
|
|
29
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
30
|
-
}))
|
|
31
|
-
|
|
32
|
-
input.write('hello')
|
|
33
|
-
input.write('\nworld')
|
|
34
|
-
input.end()
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
test('split four lines on three writes', function (t) {
|
|
38
|
-
t.plan(2)
|
|
39
|
-
|
|
40
|
-
const input = split()
|
|
41
|
-
|
|
42
|
-
input.pipe(strcb(function (err, list) {
|
|
43
|
-
t.error(err)
|
|
44
|
-
t.deepEqual(list, ['hello', 'world', 'bye', 'world'])
|
|
45
|
-
}))
|
|
46
|
-
|
|
47
|
-
input.write('hello\nwor')
|
|
48
|
-
input.write('ld\nbye\nwo')
|
|
49
|
-
input.write('rld')
|
|
50
|
-
input.end()
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
test('accumulate multiple writes', function (t) {
|
|
54
|
-
t.plan(2)
|
|
55
|
-
|
|
56
|
-
const input = split()
|
|
57
|
-
|
|
58
|
-
input.pipe(strcb(function (err, list) {
|
|
59
|
-
t.error(err)
|
|
60
|
-
t.deepEqual(list, ['helloworld'])
|
|
61
|
-
}))
|
|
62
|
-
|
|
63
|
-
input.write('hello')
|
|
64
|
-
input.write('world')
|
|
65
|
-
input.end()
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
test('split using a custom string matcher', function (t) {
|
|
69
|
-
t.plan(2)
|
|
70
|
-
|
|
71
|
-
const input = split('~')
|
|
72
|
-
|
|
73
|
-
input.pipe(strcb(function (err, list) {
|
|
74
|
-
t.error(err)
|
|
75
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
76
|
-
}))
|
|
77
|
-
|
|
78
|
-
input.end('hello~world')
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
test('split using a custom regexp matcher', function (t) {
|
|
82
|
-
t.plan(2)
|
|
83
|
-
|
|
84
|
-
const input = split(/~/)
|
|
85
|
-
|
|
86
|
-
input.pipe(strcb(function (err, list) {
|
|
87
|
-
t.error(err)
|
|
88
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
89
|
-
}))
|
|
90
|
-
|
|
91
|
-
input.end('hello~world')
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
test('support an option argument', function (t) {
|
|
95
|
-
t.plan(2)
|
|
96
|
-
|
|
97
|
-
const input = split({ highWaterMark: 2 })
|
|
98
|
-
|
|
99
|
-
input.pipe(strcb(function (err, list) {
|
|
100
|
-
t.error(err)
|
|
101
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
102
|
-
}))
|
|
103
|
-
|
|
104
|
-
input.end('hello\nworld')
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
test('support a mapper function', function (t) {
|
|
108
|
-
t.plan(2)
|
|
109
|
-
|
|
110
|
-
const a = { a: '42' }
|
|
111
|
-
const b = { b: '24' }
|
|
112
|
-
|
|
113
|
-
const input = split(JSON.parse)
|
|
114
|
-
|
|
115
|
-
input.pipe(objcb(function (err, list) {
|
|
116
|
-
t.error(err)
|
|
117
|
-
t.deepEqual(list, [a, b])
|
|
118
|
-
}))
|
|
119
|
-
|
|
120
|
-
input.write(JSON.stringify(a))
|
|
121
|
-
input.write('\n')
|
|
122
|
-
input.end(JSON.stringify(b))
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
test('split lines windows-style', function (t) {
|
|
126
|
-
t.plan(2)
|
|
127
|
-
|
|
128
|
-
const input = split()
|
|
129
|
-
|
|
130
|
-
input.pipe(strcb(function (err, list) {
|
|
131
|
-
t.error(err)
|
|
132
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
133
|
-
}))
|
|
134
|
-
|
|
135
|
-
input.end('hello\r\nworld')
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
test('splits a buffer', function (t) {
|
|
139
|
-
t.plan(2)
|
|
140
|
-
|
|
141
|
-
const input = split()
|
|
142
|
-
|
|
143
|
-
input.pipe(strcb(function (err, list) {
|
|
144
|
-
t.error(err)
|
|
145
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
146
|
-
}))
|
|
147
|
-
|
|
148
|
-
input.end(Buffer.from('hello\nworld'))
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
test('do not end on undefined', function (t) {
|
|
152
|
-
t.plan(2)
|
|
153
|
-
|
|
154
|
-
const input = split(function (line) { })
|
|
155
|
-
|
|
156
|
-
input.pipe(strcb(function (err, list) {
|
|
157
|
-
t.error(err)
|
|
158
|
-
t.deepEqual(list, [])
|
|
159
|
-
}))
|
|
160
|
-
|
|
161
|
-
input.end(Buffer.from('hello\nworld'))
|
|
162
|
-
})
|
|
163
|
-
|
|
164
|
-
test('has destroy method', function (t) {
|
|
165
|
-
t.plan(1)
|
|
166
|
-
|
|
167
|
-
const input = split(function (line) { })
|
|
168
|
-
|
|
169
|
-
input.on('close', function () {
|
|
170
|
-
t.ok(true, 'close emitted')
|
|
171
|
-
t.end()
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
input.destroy()
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
test('support custom matcher and mapper', function (t) {
|
|
178
|
-
t.plan(4)
|
|
179
|
-
|
|
180
|
-
const a = { a: '42' }
|
|
181
|
-
const b = { b: '24' }
|
|
182
|
-
const input = split('~', JSON.parse)
|
|
183
|
-
|
|
184
|
-
t.equal(input.matcher, '~')
|
|
185
|
-
t.equal(typeof input.mapper, 'function')
|
|
186
|
-
|
|
187
|
-
input.pipe(objcb(function (err, list) {
|
|
188
|
-
t.notOk(err, 'no errors')
|
|
189
|
-
t.deepEqual(list, [a, b])
|
|
190
|
-
}))
|
|
191
|
-
|
|
192
|
-
input.write(JSON.stringify(a))
|
|
193
|
-
input.write('~')
|
|
194
|
-
input.end(JSON.stringify(b))
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
test('support custom matcher and options', function (t) {
|
|
198
|
-
t.plan(6)
|
|
199
|
-
|
|
200
|
-
const input = split('~', { highWaterMark: 1024 })
|
|
201
|
-
|
|
202
|
-
t.equal(input.matcher, '~')
|
|
203
|
-
t.equal(typeof input.mapper, 'function')
|
|
204
|
-
t.equal(input._readableState.highWaterMark, 1024)
|
|
205
|
-
t.equal(input._writableState.highWaterMark, 1024)
|
|
206
|
-
|
|
207
|
-
input.pipe(strcb(function (err, list) {
|
|
208
|
-
t.error(err)
|
|
209
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
210
|
-
}))
|
|
211
|
-
|
|
212
|
-
input.end('hello~world')
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
test('support mapper and options', function (t) {
|
|
216
|
-
t.plan(6)
|
|
217
|
-
|
|
218
|
-
const a = { a: '42' }
|
|
219
|
-
const b = { b: '24' }
|
|
220
|
-
const input = split(JSON.parse, { highWaterMark: 1024 })
|
|
221
|
-
|
|
222
|
-
t.ok(input.matcher instanceof RegExp, 'matcher is RegExp')
|
|
223
|
-
t.equal(typeof input.mapper, 'function')
|
|
224
|
-
t.equal(input._readableState.highWaterMark, 1024)
|
|
225
|
-
t.equal(input._writableState.highWaterMark, 1024)
|
|
226
|
-
|
|
227
|
-
input.pipe(objcb(function (err, list) {
|
|
228
|
-
t.error(err)
|
|
229
|
-
t.deepEqual(list, [a, b])
|
|
230
|
-
}))
|
|
231
|
-
|
|
232
|
-
input.write(JSON.stringify(a))
|
|
233
|
-
input.write('\n')
|
|
234
|
-
input.end(JSON.stringify(b))
|
|
235
|
-
})
|
|
236
|
-
|
|
237
|
-
test('split utf8 chars', function (t) {
|
|
238
|
-
t.plan(2)
|
|
239
|
-
|
|
240
|
-
const input = split()
|
|
241
|
-
|
|
242
|
-
input.pipe(strcb(function (err, list) {
|
|
243
|
-
t.error(err)
|
|
244
|
-
t.deepEqual(list, ['烫烫烫', '锟斤拷'])
|
|
245
|
-
}))
|
|
246
|
-
|
|
247
|
-
const buf = Buffer.from('烫烫烫\r\n锟斤拷', 'utf8')
|
|
248
|
-
for (let i = 0; i < buf.length; ++i) {
|
|
249
|
-
input.write(buf.slice(i, i + 1))
|
|
250
|
-
}
|
|
251
|
-
input.end()
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
test('split utf8 chars 2by2', function (t) {
|
|
255
|
-
t.plan(2)
|
|
256
|
-
|
|
257
|
-
const input = split()
|
|
258
|
-
|
|
259
|
-
input.pipe(strcb(function (err, list) {
|
|
260
|
-
t.error(err)
|
|
261
|
-
t.deepEqual(list, ['烫烫烫', '烫烫烫'])
|
|
262
|
-
}))
|
|
263
|
-
|
|
264
|
-
const str = '烫烫烫\r\n烫烫烫'
|
|
265
|
-
const buf = Buffer.from(str, 'utf8')
|
|
266
|
-
for (let i = 0; i < buf.length; i += 2) {
|
|
267
|
-
input.write(buf.slice(i, i + 2))
|
|
268
|
-
}
|
|
269
|
-
input.end()
|
|
270
|
-
})
|
|
271
|
-
|
|
272
|
-
test('split lines when the \n comes at the end of a chunk', function (t) {
|
|
273
|
-
t.plan(2)
|
|
274
|
-
|
|
275
|
-
const input = split()
|
|
276
|
-
|
|
277
|
-
input.pipe(strcb(function (err, list) {
|
|
278
|
-
t.error(err)
|
|
279
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
280
|
-
}))
|
|
281
|
-
|
|
282
|
-
input.write('hello\n')
|
|
283
|
-
input.end('world')
|
|
284
|
-
})
|
|
285
|
-
|
|
286
|
-
test('truncated utf-8 char', function (t) {
|
|
287
|
-
t.plan(2)
|
|
288
|
-
|
|
289
|
-
const input = split()
|
|
290
|
-
|
|
291
|
-
input.pipe(strcb(function (err, list) {
|
|
292
|
-
t.error(err)
|
|
293
|
-
t.deepEqual(list, ['烫' + Buffer.from('e7', 'hex').toString()])
|
|
294
|
-
}))
|
|
295
|
-
|
|
296
|
-
const str = '烫烫'
|
|
297
|
-
const buf = Buffer.from(str, 'utf8')
|
|
298
|
-
|
|
299
|
-
input.write(buf.slice(0, 3))
|
|
300
|
-
input.end(buf.slice(3, 4))
|
|
301
|
-
})
|
|
302
|
-
|
|
303
|
-
test('maximum buffer limit', function (t) {
|
|
304
|
-
t.plan(1)
|
|
305
|
-
|
|
306
|
-
const input = split({ maxLength: 2 })
|
|
307
|
-
input.on('error', function (err) {
|
|
308
|
-
t.ok(err)
|
|
309
|
-
})
|
|
310
|
-
|
|
311
|
-
input.resume()
|
|
312
|
-
|
|
313
|
-
input.write('hey')
|
|
314
|
-
})
|
|
315
|
-
|
|
316
|
-
test('readable highWaterMark', function (t) {
|
|
317
|
-
const input = split()
|
|
318
|
-
t.equal(input._readableState.highWaterMark, 16)
|
|
319
|
-
t.end()
|
|
320
|
-
})
|
|
321
|
-
|
|
322
|
-
test('maxLength < chunk size', function (t) {
|
|
323
|
-
t.plan(2)
|
|
324
|
-
|
|
325
|
-
const input = split({ maxLength: 2 })
|
|
326
|
-
|
|
327
|
-
input.pipe(strcb(function (err, list) {
|
|
328
|
-
t.error(err)
|
|
329
|
-
t.deepEqual(list, ['a', 'b'])
|
|
330
|
-
}))
|
|
331
|
-
|
|
332
|
-
input.end('a\nb')
|
|
333
|
-
})
|
|
334
|
-
|
|
335
|
-
test('maximum buffer limit w/skip', function (t) {
|
|
336
|
-
t.plan(2)
|
|
337
|
-
|
|
338
|
-
const input = split({ maxLength: 2, skipOverflow: true })
|
|
339
|
-
|
|
340
|
-
input.pipe(strcb(function (err, list) {
|
|
341
|
-
t.error(err)
|
|
342
|
-
t.deepEqual(list, ['a', 'b', 'c'])
|
|
343
|
-
}))
|
|
344
|
-
|
|
345
|
-
input.write('a\n123')
|
|
346
|
-
input.write('456')
|
|
347
|
-
input.write('789\nb\nc')
|
|
348
|
-
input.end()
|
|
349
|
-
})
|
|
350
|
-
|
|
351
|
-
test("don't modify the options object", function (t) {
|
|
352
|
-
t.plan(2)
|
|
353
|
-
|
|
354
|
-
const options = {}
|
|
355
|
-
const input = split(options)
|
|
356
|
-
|
|
357
|
-
input.pipe(strcb(function (err, list) {
|
|
358
|
-
t.error(err)
|
|
359
|
-
t.same(options, {})
|
|
360
|
-
}))
|
|
361
|
-
|
|
362
|
-
input.end()
|
|
363
|
-
})
|
|
364
|
-
|
|
365
|
-
test('mapper throws flush', function (t) {
|
|
366
|
-
t.plan(1)
|
|
367
|
-
const error = new Error()
|
|
368
|
-
const input = split(function () {
|
|
369
|
-
throw error
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
input.on('error', (err, list) => {
|
|
373
|
-
t.same(err, error)
|
|
374
|
-
})
|
|
375
|
-
input.end('hello')
|
|
376
|
-
})
|
|
377
|
-
|
|
378
|
-
test('mapper throws on transform', function (t) {
|
|
379
|
-
t.plan(1)
|
|
380
|
-
|
|
381
|
-
const error = new Error()
|
|
382
|
-
const input = split(function (l) {
|
|
383
|
-
throw error
|
|
384
|
-
})
|
|
385
|
-
|
|
386
|
-
input.on('error', (err) => {
|
|
387
|
-
t.same(err, error)
|
|
388
|
-
})
|
|
389
|
-
input.write('a')
|
|
390
|
-
input.write('\n')
|
|
391
|
-
input.end('b')
|
|
392
|
-
})
|
|
393
|
-
|
|
394
|
-
test('supports Symbol.split', function (t) {
|
|
395
|
-
t.plan(2)
|
|
396
|
-
|
|
397
|
-
const input = split({
|
|
398
|
-
[Symbol.split] (str) {
|
|
399
|
-
return str.split('~')
|
|
400
|
-
}
|
|
401
|
-
})
|
|
402
|
-
|
|
403
|
-
input.pipe(strcb(function (err, list) {
|
|
404
|
-
t.error(err)
|
|
405
|
-
t.deepEqual(list, ['hello', 'world'])
|
|
406
|
-
}))
|
|
407
|
-
|
|
408
|
-
input.end('hello~world')
|
|
409
|
-
})
|