decocms 2.285.0 → 2.286.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-0nxz1rX8.js → AlertCircle-DTmaHldD.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-C2eNhBDd.js → ArrowNarrowLeft-DlPeFc4v.js} +1 -1
- package/dist/client/assets/{CheckCircle-CkYTxj_S.js → CheckCircle-DJ3lme5R.js} +1 -1
- package/dist/client/assets/{ChevronDown-CYzIAmcr.js → ChevronDown-DGnjAtqs.js} +1 -1
- package/dist/client/assets/{ChevronRight-DeEIl6Ga.js → ChevronRight-DV9No7GF.js} +1 -1
- package/dist/client/assets/{ChevronUp-MMJijhLH.js → ChevronUp-BkSgkwhO.js} +1 -1
- package/dist/client/assets/{Container-Co8nThxH.js → Container-B1nHZdmn.js} +1 -1
- package/dist/client/assets/DotsVertical-Bp2tW8JI.js +1 -0
- package/dist/client/assets/{LinkExternal01-B1CK34My.js → LinkExternal01-BBbCPDtX.js} +1 -1
- package/dist/client/assets/{Lock01-D0hjzmk2.js → Lock01-DpPIS3K7.js} +1 -1
- package/dist/client/assets/{Palette-Dk9Jb8jx.js → Palette-CI8n49a8.js} +1 -1
- package/dist/client/assets/{Play-BxeG5fNv.js → Play-DKFUTU3G.js} +1 -1
- package/dist/client/assets/{Plus-gZScqBbn.js → Plus-oXFwCrYz.js} +1 -1
- package/dist/client/assets/RefreshCcw01-B10mKiE2.js +1 -0
- package/dist/client/assets/SearchMd-BRJBvWf4.js +1 -0
- package/dist/client/assets/{Settings02-BF97-Fnm.js → Settings02-Dm9dFDqk.js} +1 -1
- package/dist/client/assets/Shield01-BZJVBd5S.js +1 -0
- package/dist/client/assets/{Star01-yc5vq0ru.js → Star01-_IJK5Yjt.js} +1 -1
- package/dist/client/assets/{Sun-B0IvK7nO.js → Sun-QqE1VnS_.js} +1 -1
- package/dist/client/assets/{Tool01-BtxOSAs7.js → Tool01-CKowkGsd.js} +1 -1
- package/dist/client/assets/{Trash01-Cv5TKLdc.js → Trash01-C6bAXG6g.js} +1 -1
- package/dist/client/assets/{User01-Bm0y4lC0.js → User01-C2-anwoO.js} +1 -1
- package/dist/client/assets/{Users03-BjqYs6sm.js → Users03-DqYvPeZM.js} +1 -1
- package/dist/client/assets/{X-D_cmo_DI.js → X-i9zBn6Hn.js} +1 -1
- package/dist/client/assets/XCircle-C1sJYG9R.js +1 -0
- package/dist/client/assets/XClose-BbIo6xHe.js +1 -0
- package/dist/client/assets/{Zap-MBVwanCx.js → Zap-KmbRMccM.js} +1 -1
- package/dist/client/assets/{ZapSquare-Acx_yvzd.js → ZapSquare-DT93lGV4.js} +1 -1
- package/dist/client/assets/{accordion-Bs6iOXfP.js → accordion-BV3tm7bj.js} +1 -1
- package/dist/client/assets/agent-icon-CyE6nkC1.js +1 -0
- package/dist/client/assets/agents-list-7o6gZt-q.js +1 -0
- package/dist/client/assets/ai-providers-DI3UF9nU.js +1 -0
- package/dist/client/assets/{alert-dialog-CGn0S0CC.js → alert-dialog-CicrCOay.js} +2 -2
- package/dist/client/assets/{auth-catchall-LYMGDHGY.js → auth-catchall-Cyd7fWQv.js} +1 -1
- package/dist/client/assets/automation-list-row-B4Vfg4UC.js +1 -0
- package/dist/client/assets/automations-DRM_lJom.js +1 -0
- package/dist/client/assets/{avatar-B4iYr4Pn.js → avatar-CF1bgUpD.js} +1 -1
- package/dist/client/assets/{badge-BKbfqB0P.js → badge-s_TAXGUN.js} +1 -1
- package/dist/client/assets/{brand-context-eZ6U4eZs.js → brand-context-iopLFZ2k.js} +1 -1
- package/dist/client/assets/{card-C6TLc-pg.js → card-CaekC2K0.js} +1 -1
- package/dist/client/assets/{chat-context-bxvplF3Z.js → chat-context-DP5UfIrn.js} +1 -1
- package/dist/client/assets/{checkbox-BafUZKEr.js → checkbox-DznLgPgR.js} +1 -1
- package/dist/client/assets/collection-detail-CTQuhG7N.js +1 -0
- package/dist/client/assets/collection-display-button-BgYKhoGQ.js +1 -0
- package/dist/client/assets/{collection-search-BSwS6tWM.js → collection-search-Bo2bOvRn.js} +1 -1
- package/dist/client/assets/{collection-search-_WhBw8st.js → collection-search-DMqppne6.js} +1 -1
- package/dist/client/assets/collection-table-wrapper-KnWZIddd.js +1 -0
- package/dist/client/assets/{collection-tabs-Cegi88gO.js → collection-tabs-CU6MCzSn.js} +1 -1
- package/dist/client/assets/{collections-CJcBtWs5.js → collections-DHmXATua.js} +1 -1
- package/dist/client/assets/command-D4w2xkZT.js +1 -0
- package/dist/client/assets/{connection-card-pbt5_GMK.js → connection-card-DBz-rrLk.js} +1 -1
- package/dist/client/assets/connection-detail-zHqb5ZSw.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B-iFdAbF.js → connection-form-helpers-CBEV0IXi.js} +1 -1
- package/dist/client/assets/connections-CHiGbl1F.js +1 -0
- package/dist/client/assets/{constants-BgpFj97_.js → constants-DDHDU3PV.js} +1 -1
- package/dist/client/assets/{constants-Dp_2h6cY.js → constants-v4RUVkEN.js} +1 -1
- package/dist/client/assets/{dialog-BlDJEasr.js → dialog-C4lREl-t.js} +1 -1
- package/dist/client/assets/{drawer-n2769KGk.js → drawer-BTCEaGGQ.js} +1 -1
- package/dist/client/assets/dropdown-menu-v2GifVOh.js +1 -0
- package/dist/client/assets/{dynamic-plugin-layout-D7LPOea8.js → dynamic-plugin-layout-CVBBnlEt.js} +1 -1
- package/dist/client/assets/{empty-state-Di9idjlO.js → empty-state-BdQTFnZA.js} +1 -1
- package/dist/client/assets/{empty-state-CCV3q11p.js → empty-state-DdKZ_is7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BkZ-2zmr.js → extract-connection-data-CfXvFcGA.js} +1 -1
- package/dist/client/assets/{features-BnFC3Zii.js → features-fsR9zLkr.js} +1 -1
- package/dist/client/assets/{form-2LsJQI5E.js → form-D7DN8UcB.js} +1 -1
- package/dist/client/assets/general-WQbdllPl.js +1 -0
- package/dist/client/assets/{github-repo-picker-DnkATBdp.js → github-repo-picker-DZqLC6FL.js} +2 -2
- package/dist/client/assets/index-BCwsJqWc.css +1 -0
- package/dist/client/assets/{index-DRvZCWzg.js → index-C5AR7k1c.js} +1 -1
- package/dist/client/assets/{index-BqgOT0Li.js → index-CHKi_s_a.js} +1 -1
- package/dist/client/assets/{index-DAwDZKfR.js → index-D-RCnwJQ.js} +1 -1
- package/dist/client/assets/{index-DHvfV22T.js → index-D34n6J5J.js} +22 -22
- package/dist/client/assets/{index-BZMU1-Zz.js → index-DBclwIf_.js} +3 -3
- package/dist/client/assets/{index-CYT7K8Th.js → index-DnJZfbsP.js} +3 -3
- package/dist/client/assets/{index-D748RB59.js → index-FnxI6OGR.js} +1 -1
- package/dist/client/assets/{index-CWVXiaiz.js → index-e3AFJ_dX.js} +1 -1
- package/dist/client/assets/{index-DGbBxceU.js → index-qXZ0t4XR.js} +25 -25
- package/dist/client/assets/{index-BXweTbWN.js → index-zDq2Zqio.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BgQN01Hf.js → infiniteQueryObserver-1_M-sq16.js} +1 -1
- package/dist/client/assets/{input-CDeKOB27.js → input-urtyHxks.js} +1 -1
- package/dist/client/assets/{integration-icon-CI13mmaS.js → integration-icon-Cdkk9YPE.js} +1 -1
- package/dist/client/assets/{label-CnjZ_mJO.js → label-Bt4h_QUk.js} +1 -1
- package/dist/client/assets/{layout-BiEb87aZ.js → layout-B5SDe6IW.js} +1 -1
- package/dist/client/assets/{login-BfsLvipz.js → login-7zFMf3C1.js} +1 -1
- package/dist/client/assets/members-Dy7hWkQ8.js +3 -0
- package/dist/client/assets/{monaco-editor-CtX0YP6U.js → monaco-editor-lveN-AoO.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BQ4J0Yec.js → monitoring-stats-row-D3x0_phM.js} +1 -1
- package/dist/client/assets/{oauth-callback-BN4EOUXR.js → oauth-callback-BJALVgfT.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BaqShyIl.js → oauth-callback-ai-provider-o8Hfz-wL.js} +1 -1
- package/dist/client/assets/{onboarding-DsfytkRm.js → onboarding-DlI3PsIA.js} +1 -1
- package/dist/client/assets/{org-layout-BfWUJisr.js → org-layout-DPzm8vzJ.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BBYslPfT.js → org-plugin-layout-DB72TzxO.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-B5LlIWxc.js → plugin-empty-state-BzyxU1IF.js} +1 -1
- package/dist/client/assets/{plugin-header-Bk48Ukf6.js → plugin-header-hJH6-4Nr.js} +1 -1
- package/dist/client/assets/{plugin-layout-BKF_beSo.js → plugin-layout-l_MDXBYc.js} +1 -1
- package/dist/client/assets/{popover-xVRU-oRu.js → popover-j_PzMtdY.js} +1 -1
- package/dist/client/assets/{profile-D-jM1gw3.js → profile-lf_QL3Ye.js} +1 -1
- package/dist/client/assets/project-app-view-DuFzKNXE.js +1 -0
- package/dist/client/assets/registry-D3m_WKwq.js +2 -0
- package/dist/client/assets/{registry-layout-DnwI9vdC.js → registry-layout-DRb_iR_v.js} +3 -3
- package/dist/client/assets/{required-auth-layout-B1r3oQ4H.js → required-auth-layout-C2o7AZ4K.js} +1 -1
- package/dist/client/assets/{reset-password-DSTvsN7x.js → reset-password-DTEY3I_i.js} +1 -1
- package/dist/client/assets/roles-DW1_Kn6r.js +1 -0
- package/dist/client/assets/{scroll-area-D5mZ0hRE.js → scroll-area-BebfgLv6.js} +1 -1
- package/dist/client/assets/{search-input-Dq6mcRO6.js → search-input-dmuYGYsk.js} +1 -1
- package/dist/client/assets/{select-DVBzN73v.js → select-CePxsPeP.js} +1 -1
- package/dist/client/assets/{select-model-CT_wRRZk.js → select-model-QQ7yjZl9.js} +2 -2
- package/dist/client/assets/settings-layout-Cd1tdTnr.js +1 -0
- package/dist/client/assets/{shell-layout-DaX2wZ77.js → shell-layout-BE22YA40.js} +1 -1
- package/dist/client/assets/{skeleton-BZGew3qV.js → skeleton-C9NsUzIb.js} +1 -1
- package/dist/client/assets/{sso-CSm1qVA0.js → sso-QSGlyP2n.js} +1 -1
- package/dist/client/assets/{store-BLxzwqyY.js → store-BB9yi6PD.js} +1 -1
- package/dist/client/assets/store-registry-BSp-W72J.js +2 -0
- package/dist/client/assets/{switch-DhZAgC2R.js → switch-VBeL01bM.js} +1 -1
- package/dist/client/assets/{table-PpA3iGsP.js → table-CQMW-Toa.js} +1 -1
- package/dist/client/assets/{tabs-CqvMN_xV.js → tabs-DOoLL5wa.js} +1 -1
- package/dist/client/assets/{task-status-fLMf5O9c.js → task-status-vvRP86lz.js} +7 -7
- package/dist/client/assets/{textarea-8UV3LDMX.js → textarea-Ie4QUdo5.js} +1 -1
- package/dist/client/assets/{toggle-group-Brc7WatS.js → toggle-group-C077Smww.js} +1 -1
- package/dist/client/assets/tools-list-UnPsMGhr.js +1 -0
- package/dist/client/assets/{types-C318llZ2.js → types-D4PfKOFF.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Do6DYo3A.js → use-ai-providers-DHuVj1kn.js} +1 -1
- package/dist/client/assets/{use-collections-B6b08eGL.js → use-collections-DRlHpXQL.js} +1 -1
- package/dist/client/assets/{use-connection-B4n7P5ZX.js → use-connection-Cif-LY0f.js} +1 -1
- package/dist/client/assets/{use-copy-D_fZmQan.js → use-copy-uiSuMvtc.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-jrLS8Jsa.js → use-create-virtual-mcp-CBpw3zXA.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BaTABZmJ.js → use-decopilot-events-Dpt6CcIN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CRBBtM2M.js → use-delete-connection-BZmW9ZAz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-E-ClEQ_w.js → use-infinite-scroll-CWlV3gJA.js} +1 -1
- package/dist/client/assets/{use-list-state-DueB6o1G.js → use-list-state-BJZWeXjY.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BGEi8TMH.js → use-mcp-tools-BYVtg7WH.js} +1 -1
- package/dist/client/assets/{use-members-C-n0fYdD.js → use-members-M_p47epa.js} +1 -1
- package/dist/client/assets/{use-mobile-DHF6z3l-.js → use-mobile-CxvYCzu9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CVVCVmb_.js → use-navigate-to-agent-CFIKBq0L.js} +1 -1
- package/dist/client/assets/{use-org-sso-CVSlB5eM.js → use-org-sso-CACnH9GQ.js} +1 -1
- package/dist/client/assets/use-organization-roles-o4lVU0iD.js +1 -0
- package/dist/client/assets/{use-organization-settings-hZWDePgg.js → use-organization-settings-BD9CIHH5.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DE87auCx.js → use-registry-connections-DR_etJ2H.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DmiUFixH.js → use-status-sounds-Ce7WandB.js} +1 -1
- package/dist/client/assets/{use-tasks-BtKmvszc.js → use-tasks-Dpp1DK1f.js} +1 -1
- package/dist/client/assets/{use-view-mode-C4RBFxYO.js → use-view-mode-CZPzVaxj.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-ByUoWLLO.js → use-virtual-mcp-0vHwLInn.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B4w-6TrV.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-WURyRq6p.js +1 -0
- package/dist/client/assets/{user-xlREBAPA.js → user-xj80BAo3.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DhKikjfW.js → view-mode-toggle-D5CGwPOj.js} +1 -1
- package/dist/client/assets/workflow-CD_DiE5j.js +1 -0
- package/dist/client/assets/workflow-detail-CxWEb-ID.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/node_modules/{postgres-bytea/license → pg/LICENSE} +6 -6
- package/dist/server/node_modules/pg/README.md +95 -0
- package/dist/server/node_modules/pg/esm/index.mjs +20 -0
- package/dist/server/node_modules/pg/lib/client.js +743 -0
- package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
- package/dist/server/node_modules/pg/lib/connection.js +221 -0
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
- package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/dist/server/node_modules/pg/lib/defaults.js +91 -0
- package/dist/server/node_modules/pg/lib/index.js +73 -0
- package/dist/server/node_modules/pg/lib/native/client.js +323 -0
- package/dist/server/node_modules/pg/lib/native/index.js +2 -0
- package/dist/server/node_modules/pg/lib/native/query.js +165 -0
- package/dist/server/node_modules/pg/lib/query.js +252 -0
- package/dist/server/node_modules/pg/lib/result.js +109 -0
- package/dist/server/node_modules/pg/lib/stream.js +83 -0
- package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/dist/server/node_modules/pg/lib/utils.js +217 -0
- package/dist/server/node_modules/pg/package.json +76 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/SearchMd-DmmmzJIi.js +0 -1
- package/dist/client/assets/XCircle-DofWfDB_.js +0 -1
- package/dist/client/assets/agent-icon-B4FOoeEp.js +0 -1
- package/dist/client/assets/agents-list-CCDumukV.js +0 -1
- package/dist/client/assets/ai-providers-DmtetLwH.js +0 -1
- package/dist/client/assets/automation-list-row-CKWNl7Xx.js +0 -1
- package/dist/client/assets/automations-t-caERGV.js +0 -1
- package/dist/client/assets/collection-detail-I5bQPS94.js +0 -1
- package/dist/client/assets/collection-display-button-D58wr6x3.js +0 -1
- package/dist/client/assets/collection-table-wrapper-DoehWRok.js +0 -1
- package/dist/client/assets/command-BDTuhAyF.js +0 -1
- package/dist/client/assets/connection-detail-CpUnSGYQ.js +0 -1
- package/dist/client/assets/connections-COVM3fme.js +0 -1
- package/dist/client/assets/dropdown-menu-DwLxT3z1.js +0 -1
- package/dist/client/assets/general-gsvbF_Za.js +0 -1
- package/dist/client/assets/index-DeSgX7LP.css +0 -1
- package/dist/client/assets/members-COWr_hPe.js +0 -3
- package/dist/client/assets/project-app-view-CjbRHagh.js +0 -1
- package/dist/client/assets/registry-iJ2QFmg-.js +0 -2
- package/dist/client/assets/settings-layout-D70kmFKJ.js +0 -1
- package/dist/client/assets/store-registry-BdrjcFsM.js +0 -2
- package/dist/client/assets/tools-list-BbeD_D_r.js +0 -1
- package/dist/client/assets/useInfiniteQuery-m9L0mxCO.js +0 -1
- package/dist/client/assets/workflow-Z523A-0v.js +0 -1
- package/dist/client/assets/workflow-detail-CLjOJ-4m.js +0 -1
- package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
- package/dist/server/node_modules/mimic-fn/index.js +0 -13
- package/dist/server/node_modules/mimic-fn/license +0 -9
- package/dist/server/node_modules/mimic-fn/package.json +0 -42
- package/dist/server/node_modules/mimic-fn/readme.md +0 -69
- 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/license +0 -21
- 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/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
|
-
})
|