decocms 2.299.0 → 2.300.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/client/assets/{AlertCircle-aQgTv3kr.js → AlertCircle-CtSiN7Dh.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-C_pLc5t-.js → ArrowNarrowLeft-CjMD5YtT.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Bws5ir-q.js → ArrowUpRight-VGEco3p8.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cwc7BvQq.js → CheckCircle-BOjQcSoZ.js} +1 -1
- package/dist/client/assets/{ChevronDown-C4MI00HX.js → ChevronDown-B21GyFLP.js} +1 -1
- package/dist/client/assets/{ChevronRight-DDkghuaf.js → ChevronRight-C7fFXCXU.js} +1 -1
- package/dist/client/assets/{ChevronUp-BjFGxYUb.js → ChevronUp-DLJe-Ifh.js} +1 -1
- package/dist/client/assets/{Container-U4v06cth.js → Container-DVwtR0PY.js} +1 -1
- package/dist/client/assets/{DotsVertical-BCK2nFhn.js → DotsVertical-_1yE4PFi.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C_yQygSO.js → LinkExternal01-BeNjIA73.js} +1 -1
- package/dist/client/assets/{Lock01-rLvN1xbd.js → Lock01-y9D26Lk9.js} +1 -1
- package/dist/client/assets/{Palette-CA95sDHj.js → Palette-xIvgAE_U.js} +1 -1
- package/dist/client/assets/{Play-BlOman6C.js → Play-esUCyQh5.js} +1 -1
- package/dist/client/assets/{Plus-B5soxpbi.js → Plus-8zlfW9Nb.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-onzNEsM4.js → RefreshCcw01-DV-_PfmV.js} +1 -1
- package/dist/client/assets/{SearchMd-fvAW1pa8.js → SearchMd-BgpZuBQH.js} +1 -1
- package/dist/client/assets/{Settings02-Cro6-7q4.js → Settings02-B2DHZxlV.js} +1 -1
- package/dist/client/assets/{Shield01-DtWtqZJ1.js → Shield01-CewVSi37.js} +1 -1
- package/dist/client/assets/{Star01-BHGJRtit.js → Star01-DupDdRAe.js} +1 -1
- package/dist/client/assets/{Sun-C6J9iUe_.js → Sun-B1MYWGMj.js} +1 -1
- package/dist/client/assets/{Tool01-DeRpug6W.js → Tool01-73PH4njb.js} +1 -1
- package/dist/client/assets/{Trash01-BSFNbfe8.js → Trash01-_-2EAUWH.js} +1 -1
- package/dist/client/assets/{User01-C-8Fo7RS.js → User01-DLnrd0WJ.js} +1 -1
- package/dist/client/assets/{Users03-C25Ink_E.js → Users03-CtQ_adLe.js} +1 -1
- package/dist/client/assets/{X-Cf3FFZEE.js → X-DavTUkoo.js} +1 -1
- package/dist/client/assets/{XCircle-CLM44_6-.js → XCircle-BKeTm8Ww.js} +1 -1
- package/dist/client/assets/{XClose-B9H_q-Ab.js → XClose-BpjQA_dF.js} +1 -1
- package/dist/client/assets/{Zap-BQvzqOLx.js → Zap-DT_tBFfJ.js} +1 -1
- package/dist/client/assets/{ZapSquare-CjSpwpWX.js → ZapSquare-BL-_ZEqM.js} +1 -1
- package/dist/client/assets/{accordion-YUzrCziW.js → accordion-pRq2Jalt.js} +1 -1
- package/dist/client/assets/{agent-icon-CyFFhaia.js → agent-icon-DnE1m294.js} +1 -1
- package/dist/client/assets/{agents-list-W7eiHZAH.js → agents-list-BoAFCp78.js} +1 -1
- package/dist/client/assets/ai-providers-CAEYBEbx.js +1 -0
- package/dist/client/assets/{alert-dialog-BRriT9Rx.js → alert-dialog-DvcLf48w.js} +1 -1
- package/dist/client/assets/{auth-catchall-dvNJT_HW.js → auth-catchall-CAJD1PoQ.js} +1 -1
- package/dist/client/assets/{automation-list-row-Dr5BqZcR.js → automation-list-row-DsEcFwqj.js} +1 -1
- package/dist/client/assets/{automations-DThDEBhK.js → automations-0IJqtFMr.js} +1 -1
- package/dist/client/assets/{avatar-DZ7Lcia3.js → avatar-B1YFr91G.js} +1 -1
- package/dist/client/assets/{badge-CNKFpwCQ.js → badge-BnwDLyJj.js} +1 -1
- package/dist/client/assets/{brand-context-FHNmQTmw.js → brand-context-D5_IL-aX.js} +1 -1
- package/dist/client/assets/{card-DVXldwSE.js → card-Hve9iIpZ.js} +1 -1
- package/dist/client/assets/{chat-context-clHOazkR.js → chat-context-C2vjARhO.js} +1 -1
- package/dist/client/assets/{checkbox-EVw79nds.js → checkbox-DmWLCJJH.js} +1 -1
- package/dist/client/assets/{collection-detail-C13v-yoJ.js → collection-detail-D8wvqyeL.js} +1 -1
- package/dist/client/assets/{collection-display-button-BM4OZbbR.js → collection-display-button-CQ2KlZSu.js} +1 -1
- package/dist/client/assets/{collection-search-DoSMDd39.js → collection-search-D_mJKf_N.js} +1 -1
- package/dist/client/assets/{collection-search-DjqZM35U.js → collection-search-DffILLk0.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-jyvgWmq5.js → collection-table-wrapper-fO254CQy.js} +1 -1
- package/dist/client/assets/{collection-tabs-Nu6UZ0Wa.js → collection-tabs-Bcs-_tfj.js} +1 -1
- package/dist/client/assets/{collections-_TpL4Kbd.js → collections-CISD8jzc.js} +1 -1
- package/dist/client/assets/{command-BGK9JNiv.js → command-CsVFknP_.js} +1 -1
- package/dist/client/assets/{connection-card-h503T7yE.js → connection-card-aTu5Xl4N.js} +1 -1
- package/dist/client/assets/{connection-detail-E3ZTKIWY.js → connection-detail-BUr0xwe0.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B5DiwUxU.js → connection-form-helpers-BEHWki2e.js} +1 -1
- package/dist/client/assets/{connections-Ba8EED2x.js → connections-BJwQ4V76.js} +1 -1
- package/dist/client/assets/{constants-lTcLVS5n.js → constants-BwurOShK.js} +1 -1
- package/dist/client/assets/{constants-CiJRSGoE.js → constants-DZ5y4NEu.js} +1 -1
- package/dist/client/assets/{dialog-BRB-AdlQ.js → dialog-BSlhJimL.js} +1 -1
- package/dist/client/assets/{domain-settings-vcc_x35P.js → domain-settings-D65HSgmV.js} +1 -1
- package/dist/client/assets/{drawer-rKfRlJNC.js → drawer-DwurUbp0.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DaYjsctt.js → dropdown-menu-Dn3K1Gpo.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Bs-dtzIc.js → dynamic-plugin-layout-uzPcJgAD.js} +1 -1
- package/dist/client/assets/{empty-state-DpWDEkDd.js → empty-state-B4R6bbr3.js} +1 -1
- package/dist/client/assets/{empty-state-DLaWKneQ.js → empty-state-DbgILpoj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DIDviCIp.js → extract-connection-data-Bp5NDOhQ.js} +1 -1
- package/dist/client/assets/{features-CE8oBb9H.js → features-MuQDQTKd.js} +1 -1
- package/dist/client/assets/{form-mI6GLCMQ.js → form-DTt4fIHo.js} +1 -1
- package/dist/client/assets/{general-27HuvgYf.js → general-C7YvzevF.js} +1 -1
- package/dist/client/assets/index-B4J1yAvl.css +1 -0
- package/dist/client/assets/{index-Ccm19Owr.js → index-BJz9Oj-t.js} +1 -1
- package/dist/client/assets/{index-B11-oLok.js → index-BTM4S0x-.js} +1 -1
- package/dist/client/assets/{index-D8ZWoKb1.js → index-BZwRn_mX.js} +1 -1
- package/dist/client/assets/index-CKNbLfs9.js +1 -0
- package/dist/client/assets/{index-cC9WxUf7.js → index-COQkJrV6.js} +1 -1
- package/dist/client/assets/{index-BdrUauLh.js → index-CbEM9IOV.js} +1 -1
- package/dist/client/assets/{index-oMBghIJJ.js → index-D1LVHcIe.js} +1 -1
- package/dist/client/assets/{index-BLqORW7O.js → index-D9wcQMm5.js} +1 -1
- package/dist/client/assets/{index-WenLlWbb.js → index-DBY00Q2Z.js} +19 -19
- package/dist/client/assets/{index-C4eEdhdn.js → index-DHKldY3y.js} +1 -1
- package/dist/client/assets/{index-hcEg81hB.js → index-DRnP8Xhy.js} +10 -10
- package/dist/client/assets/{index-CHiZkXhm.js → index-Day-HjXR.js} +1 -1
- package/dist/client/assets/{index-CD-vU91r.js → index-XlHohbXo.js} +1 -1
- package/dist/client/assets/{index-DHZDsons.js → index-h0Ny6VA2.js} +1 -1
- package/dist/client/assets/{index-B3FEpuQw.js → index-uTtq-reU.js} +1 -1
- package/dist/client/assets/{index-B3zZp_Qu.js → index-ygN6PiaU.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DkM0VxlF.js → infiniteQueryObserver-BFZ15R1_.js} +1 -1
- package/dist/client/assets/{input-Cuud93wX.js → input-liZY-axz.js} +1 -1
- package/dist/client/assets/{integration-icon-CsrRg2Lu.js → integration-icon-Cz-seBmA.js} +1 -1
- package/dist/client/assets/{label-Bk3DQN0Y.js → label-CrXFAdsO.js} +1 -1
- package/dist/client/assets/{layout-BtQea4Qg.js → layout-bMTJXFfz.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CbbipZjJ.js → lean-canvas-recruit-modal-DZ6knxg9.js} +1 -1
- package/dist/client/assets/{login-BgZ8a57W.js → login-CWW3hrOg.js} +1 -1
- package/dist/client/assets/{members-BrEtD2C0.js → members-DKWnDmHd.js} +1 -1
- package/dist/client/assets/{monaco-editor-B5h0xAd0.js → monaco-editor-Cx68yuxi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-FmuYstq7.js → monitoring-stats-row-BFqk7UYd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D2JxS3R_.js → oauth-callback-ai-provider-ONRq40Il.js} +1 -1
- package/dist/client/assets/{oauth-callback-BOHYAMsk.js → oauth-callback-nz50ugwL.js} +1 -1
- package/dist/client/assets/{onboarding-Dls-YBag.js → onboarding-CbZyKtbC.js} +1 -1
- package/dist/client/assets/{org-layout-B0WpG86a.js → org-layout-DkS2FRIV.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-fSkxW1jN.js → org-plugin-layout-DnoycXXu.js} +1 -1
- package/dist/client/assets/{pair-CqYfP4a_.js → pair-rqe3skqp.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C3M4-bHq.js → plugin-empty-state-DAJtqa_X.js} +1 -1
- package/dist/client/assets/{plugin-header-Bhl8FTKN.js → plugin-header-DnTysGuR.js} +1 -1
- package/dist/client/assets/{plugin-layout-DOuAk8f9.js → plugin-layout-Zl5kAJLg.js} +1 -1
- package/dist/client/assets/{popover-BWawolwL.js → popover-B6ijC2Zf.js} +1 -1
- package/dist/client/assets/{profile-DKggoElb.js → profile-Wj3GJkbr.js} +1 -1
- package/dist/client/assets/{project-app-view-BTqqbkYN.js → project-app-view-DufFnF1s.js} +1 -1
- package/dist/client/assets/registry-D49ZAHvu.js +2 -0
- package/dist/client/assets/{registry-layout-Bcb0ETu2.js → registry-layout-BvfKYFzg.js} +1 -1
- package/dist/client/assets/{required-auth-layout-B0aP_BYa.js → required-auth-layout-CKQlCfyf.js} +1 -1
- package/dist/client/assets/{reset-password-DAQu9CHm.js → reset-password-4dmtvYgx.js} +1 -1
- package/dist/client/assets/{roles-CV8Id8qK.js → roles-DlsIbipv.js} +1 -1
- package/dist/client/assets/{scroll-area-0g8Z_dWS.js → scroll-area-D_0eTXQI.js} +1 -1
- package/dist/client/assets/{search-input-jyuCy7Ai.js → search-input-CbBz2_I7.js} +1 -1
- package/dist/client/assets/{select-hpzuL2n7.js → select-DwQCWni4.js} +1 -1
- package/dist/client/assets/{select-model-CtHOnPsy.js → select-model-CSzGroxj.js} +1 -1
- package/dist/client/assets/{settings-layout-ClllTp0r.js → settings-layout-D2TzHadG.js} +1 -1
- package/dist/client/assets/{settings-section-DTpTGGC-.js → settings-section-CVNbjkC4.js} +1 -1
- package/dist/client/assets/{shell-layout-B405kN5F.js → shell-layout-BK74oWLU.js} +1 -1
- package/dist/client/assets/{skeleton-B9GboYxM.js → skeleton-DnMJGIDK.js} +1 -1
- package/dist/client/assets/{sso-Dh1NgG1u.js → sso-ByZblLmU.js} +1 -1
- package/dist/client/assets/{store-2uy2qIUV.js → store-D02KrT4m.js} +1 -1
- package/dist/client/assets/store-registry-C02mfQOQ.js +2 -0
- package/dist/client/assets/{switch-CD5xHhwa.js → switch-BwYbkaPM.js} +1 -1
- package/dist/client/assets/{table-Bl-CW2Ey.js → table-dOL69UsN.js} +1 -1
- package/dist/client/assets/{tabs-8bRAvOFB.js → tabs-CGg7lV45.js} +1 -1
- package/dist/client/assets/{task-status-Df19deFg.js → task-status-DAgh3LfT.js} +1 -1
- package/dist/client/assets/{textarea-0ebJKTCS.js → textarea-CkxfQbxI.js} +1 -1
- package/dist/client/assets/{toggle-group-BqrVPEZw.js → toggle-group-C5VhmQig.js} +1 -1
- package/dist/client/assets/{tools-list-1YgWwNhM.js → tools-list-CwM3RxlF.js} +1 -1
- package/dist/client/assets/{tooltip-CGmvkTM6.js → tooltip-CUw8WpYG.js} +1 -1
- package/dist/client/assets/{types-CN-G9hqy.js → types-slR7lXH6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BtZzelvz.js → use-ai-providers-DespFg1Y.js} +1 -1
- package/dist/client/assets/{use-collections-DjbmBbmU.js → use-collections-CDG0ivO9.js} +1 -1
- package/dist/client/assets/{use-connection-CffI5S47.js → use-connection-DDedfw7l.js} +1 -1
- package/dist/client/assets/{use-copy-DNx2iDfI.js → use-copy-Czy0YFNn.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BFp1mbc9.js → use-create-virtual-mcp-Bhi93QNY.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D5TlUkky.js → use-decopilot-events-DkzJQYGR.js} +1 -1
- package/dist/client/assets/{use-delete-connection-O5X9Xo4O.js → use-delete-connection-CG2J3Cjn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-FZg8WuOv.js → use-infinite-scroll-qjXoMT8U.js} +1 -1
- package/dist/client/assets/{use-list-state-CbWjR069.js → use-list-state-D2VmPCpI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CxZifaYv.js → use-mcp-tools-nd8RTEJZ.js} +1 -1
- package/dist/client/assets/{use-members-CXQMD9Vu.js → use-members-BWz4qY4v.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C0C5E43c.js → use-navigate-to-agent-Dj0boPYr.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dy4G77my.js → use-org-auth-client-_7iLBAbg.js} +1 -1
- package/dist/client/assets/{use-org-sso-Drj77Zm1.js → use-org-sso-CXTYwYuw.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DmSBxwGY.js → use-organization-roles-BmJJrwum.js} +1 -1
- package/dist/client/assets/{use-organization-settings--1KNcya1.js → use-organization-settings-C516uAxZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BaBm7Ii1.js → use-registry-connections-BH65PVKK.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BDL4IJ6A.js → use-status-sounds-COJng9ez.js} +1 -1
- package/dist/client/assets/{use-tasks-DF42FEXc.js → use-tasks-BMtiaufW.js} +1 -1
- package/dist/client/assets/{use-view-mode-CBcjjJZG.js → use-view-mode-B3HPjSsa.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CTmQF3FY.js → use-virtual-mcp-Dkco3wCF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-mbgOLEDd.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DZGLPMRe.js +1 -0
- package/dist/client/assets/{user-DNhBNgsY.js → user-BCVAIUhB.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-KbDgQNkg.js → view-mode-toggle-Bbj9P-zr.js} +1 -1
- package/dist/client/assets/{workflow-DZzf5GRI.js → workflow-DZKRFLJh.js} +1 -1
- package/dist/client/assets/workflow-detail-Bm0PdrL9.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
- package/dist/server/node_modules/ansi-regex/index.js +14 -0
- package/dist/server/node_modules/{ansi-styles → ansi-regex}/package.json +20 -13
- package/dist/server/node_modules/ansi-regex/readme.md +66 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-D112U5ed.js +0 -1
- package/dist/client/assets/index-CLgHTXwu.js +0 -1
- package/dist/client/assets/index-DT63_YMm.css +0 -1
- package/dist/client/assets/registry-BOvZQpcE.js +0 -2
- package/dist/client/assets/store-registry-LkT6leWD.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BugVQNDu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CMPA3kQv.js +0 -1
- package/dist/client/assets/workflow-detail-OXlDN5sZ.js +0 -1
- package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
- package/dist/server/node_modules/ansi-styles/index.js +0 -223
- package/dist/server/node_modules/ansi-styles/readme.md +0 -173
- package/dist/server/node_modules/environment/index.d.ts +0 -74
- package/dist/server/node_modules/environment/index.js +0 -47
- package/dist/server/node_modules/environment/license +0 -9
- package/dist/server/node_modules/environment/package.json +0 -74
- package/dist/server/node_modules/environment/readme.md +0 -94
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
- package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
- package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
- package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
- package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
- package/dist/server/node_modules/string-width/index.d.ts +0 -39
- package/dist/server/node_modules/string-width/index.js +0 -82
- package/dist/server/node_modules/string-width/license +0 -9
- package/dist/server/node_modules/string-width/package.json +0 -64
- package/dist/server/node_modules/string-width/readme.md +0 -66
- /package/dist/server/node_modules/{ansi-styles → ansi-regex}/license +0 -0
- /package/dist/server/node_modules/{escape-string-regexp → mimic-fn}/license +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "ansi-
|
|
3
|
-
"version": "6.2.
|
|
4
|
-
"description": "
|
|
2
|
+
"name": "ansi-regex",
|
|
3
|
+
"version": "6.2.2",
|
|
4
|
+
"description": "Regular expression for matching ANSI escape codes",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository": "chalk/ansi-
|
|
7
|
-
"funding": "https://github.com/chalk/ansi-
|
|
6
|
+
"repository": "chalk/ansi-regex",
|
|
7
|
+
"funding": "https://github.com/chalk/ansi-regex?sponsor=1",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Sindre Sorhus",
|
|
10
10
|
"email": "sindresorhus@gmail.com",
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"exports": "./index.js",
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"sideEffects": false,
|
|
15
17
|
"engines": {
|
|
16
18
|
"node": ">=12"
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
21
|
"test": "xo && ava && tsd",
|
|
20
|
-
"
|
|
22
|
+
"view-supported": "node fixtures/view-codes.js"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
23
25
|
"index.js",
|
|
@@ -40,15 +42,20 @@
|
|
|
40
42
|
"256",
|
|
41
43
|
"shell",
|
|
42
44
|
"xterm",
|
|
43
|
-
"log",
|
|
44
|
-
"logging",
|
|
45
45
|
"command-line",
|
|
46
|
-
"text"
|
|
46
|
+
"text",
|
|
47
|
+
"regex",
|
|
48
|
+
"regexp",
|
|
49
|
+
"re",
|
|
50
|
+
"match",
|
|
51
|
+
"test",
|
|
52
|
+
"find",
|
|
53
|
+
"pattern"
|
|
47
54
|
],
|
|
48
55
|
"devDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"tsd": "^0.
|
|
52
|
-
"xo": "^0.
|
|
56
|
+
"ansi-escapes": "^5.0.0",
|
|
57
|
+
"ava": "^3.15.0",
|
|
58
|
+
"tsd": "^0.21.0",
|
|
59
|
+
"xo": "^0.54.2"
|
|
53
60
|
}
|
|
54
61
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# ansi-regex
|
|
2
|
+
|
|
3
|
+
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install ansi-regex
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import ansiRegex from 'ansi-regex';
|
|
15
|
+
|
|
16
|
+
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
|
17
|
+
//=> true
|
|
18
|
+
|
|
19
|
+
ansiRegex().test('cake');
|
|
20
|
+
//=> false
|
|
21
|
+
|
|
22
|
+
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
|
23
|
+
//=> ['\u001B[4m', '\u001B[0m']
|
|
24
|
+
|
|
25
|
+
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
|
|
26
|
+
//=> ['\u001B[4m']
|
|
27
|
+
|
|
28
|
+
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
|
|
29
|
+
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
### ansiRegex(options?)
|
|
35
|
+
|
|
36
|
+
Returns a regex for matching ANSI escape codes.
|
|
37
|
+
|
|
38
|
+
#### options
|
|
39
|
+
|
|
40
|
+
Type: `object`
|
|
41
|
+
|
|
42
|
+
##### onlyFirst
|
|
43
|
+
|
|
44
|
+
Type: `boolean`\
|
|
45
|
+
Default: `false` *(Matches any ANSI escape codes in a string)*
|
|
46
|
+
|
|
47
|
+
Match only the first ANSI escape.
|
|
48
|
+
|
|
49
|
+
## Important
|
|
50
|
+
|
|
51
|
+
If you run the regex against untrusted user input in a server context, you should [give it a timeout](https://github.com/sindresorhus/super-regex).
|
|
52
|
+
|
|
53
|
+
**I do not consider [ReDoS](https://blog.yossarian.net/2022/12/28/ReDoS-vulnerabilities-and-misaligned-incentives) a valid vulnerability for this package.**
|
|
54
|
+
|
|
55
|
+
## FAQ
|
|
56
|
+
|
|
57
|
+
### Why do you test for codes not in the ECMA 48 standard?
|
|
58
|
+
|
|
59
|
+
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
|
60
|
+
|
|
61
|
+
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
|
62
|
+
|
|
63
|
+
## Maintainers
|
|
64
|
+
|
|
65
|
+
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
66
|
+
- [Josh Junon](https://github.com/qix-)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const mimicFn: {
|
|
2
|
+
/**
|
|
3
|
+
Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
4
|
+
|
|
5
|
+
@param to - Mimicking function.
|
|
6
|
+
@param from - Function to mimic.
|
|
7
|
+
@returns The modified `to` function.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
```
|
|
11
|
+
import mimicFn = require('mimic-fn');
|
|
12
|
+
|
|
13
|
+
function foo() {}
|
|
14
|
+
foo.unicorn = '🦄';
|
|
15
|
+
|
|
16
|
+
function wrapper() {
|
|
17
|
+
return foo();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(wrapper.name);
|
|
21
|
+
//=> 'wrapper'
|
|
22
|
+
|
|
23
|
+
mimicFn(wrapper, foo);
|
|
24
|
+
|
|
25
|
+
console.log(wrapper.name);
|
|
26
|
+
//=> 'foo'
|
|
27
|
+
|
|
28
|
+
console.log(wrapper.unicorn);
|
|
29
|
+
//=> '🦄'
|
|
30
|
+
```
|
|
31
|
+
*/
|
|
32
|
+
<
|
|
33
|
+
ArgumentsType extends unknown[],
|
|
34
|
+
ReturnType,
|
|
35
|
+
FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
36
|
+
>(
|
|
37
|
+
to: (...arguments: ArgumentsType) => ReturnType,
|
|
38
|
+
from: FunctionType
|
|
39
|
+
): FunctionType;
|
|
40
|
+
|
|
41
|
+
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
42
|
+
// declare function mimicFn<
|
|
43
|
+
// ArgumentsType extends unknown[],
|
|
44
|
+
// ReturnType,
|
|
45
|
+
// FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
46
|
+
// >(
|
|
47
|
+
// to: (...arguments: ArgumentsType) => ReturnType,
|
|
48
|
+
// from: FunctionType
|
|
49
|
+
// ): FunctionType;
|
|
50
|
+
// export = mimicFn;
|
|
51
|
+
default: typeof mimicFn;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export = mimicFn;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const mimicFn = (to, from) => {
|
|
4
|
+
for (const prop of Reflect.ownKeys(from)) {
|
|
5
|
+
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return to;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
module.exports = mimicFn;
|
|
12
|
+
// TODO: Remove this for the next major release
|
|
13
|
+
module.exports.default = mimicFn;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mimic-fn",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Make a function mimic another one",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/mimic-fn",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=6"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js",
|
|
20
|
+
"index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"keywords": [
|
|
23
|
+
"function",
|
|
24
|
+
"mimic",
|
|
25
|
+
"imitate",
|
|
26
|
+
"rename",
|
|
27
|
+
"copy",
|
|
28
|
+
"inherit",
|
|
29
|
+
"properties",
|
|
30
|
+
"name",
|
|
31
|
+
"func",
|
|
32
|
+
"fn",
|
|
33
|
+
"set",
|
|
34
|
+
"infer",
|
|
35
|
+
"change"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"ava": "^1.4.1",
|
|
39
|
+
"tsd": "^0.7.1",
|
|
40
|
+
"xo": "^0.24.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
|
2
|
+
|
|
3
|
+
> Make a function mimic another one
|
|
4
|
+
|
|
5
|
+
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
$ npm install mimic-fn
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const mimicFn = require('mimic-fn');
|
|
19
|
+
|
|
20
|
+
function foo() {}
|
|
21
|
+
foo.unicorn = '🦄';
|
|
22
|
+
|
|
23
|
+
function wrapper() {
|
|
24
|
+
return foo();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
console.log(wrapper.name);
|
|
28
|
+
//=> 'wrapper'
|
|
29
|
+
|
|
30
|
+
mimicFn(wrapper, foo);
|
|
31
|
+
|
|
32
|
+
console.log(wrapper.name);
|
|
33
|
+
//=> 'foo'
|
|
34
|
+
|
|
35
|
+
console.log(wrapper.unicorn);
|
|
36
|
+
//=> '🦄'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
43
|
+
|
|
44
|
+
### mimicFn(to, from)
|
|
45
|
+
|
|
46
|
+
Modifies the `to` function and returns it.
|
|
47
|
+
|
|
48
|
+
#### to
|
|
49
|
+
|
|
50
|
+
Type: `Function`
|
|
51
|
+
|
|
52
|
+
Mimicking function.
|
|
53
|
+
|
|
54
|
+
#### from
|
|
55
|
+
|
|
56
|
+
Type: `Function`
|
|
57
|
+
|
|
58
|
+
Function to mimic.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## Related
|
|
62
|
+
|
|
63
|
+
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
|
64
|
+
- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright © 2017, Charmander <~@charmander.me>
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
5
|
+
copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
9
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[![Build status][ci image]][ci]
|
|
2
|
+
|
|
3
|
+
64-bit big-endian signed integer-to-string conversion designed for [pg][].
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
const readInt8 = require('pg-int8');
|
|
7
|
+
|
|
8
|
+
readInt8(Buffer.from([0, 1, 2, 3, 4, 5, 6, 7]))
|
|
9
|
+
// '283686952306183'
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[pg]: https://github.com/brianc/node-postgres
|
|
14
|
+
|
|
15
|
+
[ci]: https://travis-ci.org/charmander/pg-int8
|
|
16
|
+
[ci image]: https://api.travis-ci.org/charmander/pg-int8.svg
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// selected so (BASE - 1) * 0x100000000 + 0xffffffff is a safe integer
|
|
4
|
+
var BASE = 1000000;
|
|
5
|
+
|
|
6
|
+
function readInt8(buffer) {
|
|
7
|
+
var high = buffer.readInt32BE(0);
|
|
8
|
+
var low = buffer.readUInt32BE(4);
|
|
9
|
+
var sign = '';
|
|
10
|
+
|
|
11
|
+
if (high < 0) {
|
|
12
|
+
high = ~high + (low === 0);
|
|
13
|
+
low = (~low + 1) >>> 0;
|
|
14
|
+
sign = '-';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var result = '';
|
|
18
|
+
var carry;
|
|
19
|
+
var t;
|
|
20
|
+
var digits;
|
|
21
|
+
var pad;
|
|
22
|
+
var l;
|
|
23
|
+
var i;
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
carry = high % BASE;
|
|
27
|
+
high = high / BASE >>> 0;
|
|
28
|
+
|
|
29
|
+
t = 0x100000000 * carry + low;
|
|
30
|
+
low = t / BASE >>> 0;
|
|
31
|
+
digits = '' + (t - BASE * low);
|
|
32
|
+
|
|
33
|
+
if (low === 0 && high === 0) {
|
|
34
|
+
return sign + digits + result;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
pad = '';
|
|
38
|
+
l = 6 - digits.length;
|
|
39
|
+
|
|
40
|
+
for (i = 0; i < l; i++) {
|
|
41
|
+
pad += '0';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
result = pad + digits + result;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
carry = high % BASE;
|
|
49
|
+
high = high / BASE >>> 0;
|
|
50
|
+
|
|
51
|
+
t = 0x100000000 * carry + low;
|
|
52
|
+
low = t / BASE >>> 0;
|
|
53
|
+
digits = '' + (t - BASE * low);
|
|
54
|
+
|
|
55
|
+
if (low === 0 && high === 0) {
|
|
56
|
+
return sign + digits + result;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
pad = '';
|
|
60
|
+
l = 6 - digits.length;
|
|
61
|
+
|
|
62
|
+
for (i = 0; i < l; i++) {
|
|
63
|
+
pad += '0';
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
result = pad + digits + result;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
{
|
|
70
|
+
carry = high % BASE;
|
|
71
|
+
high = high / BASE >>> 0;
|
|
72
|
+
|
|
73
|
+
t = 0x100000000 * carry + low;
|
|
74
|
+
low = t / BASE >>> 0;
|
|
75
|
+
digits = '' + (t - BASE * low);
|
|
76
|
+
|
|
77
|
+
if (low === 0 && high === 0) {
|
|
78
|
+
return sign + digits + result;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
pad = '';
|
|
82
|
+
l = 6 - digits.length;
|
|
83
|
+
|
|
84
|
+
for (i = 0; i < l; i++) {
|
|
85
|
+
pad += '0';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
result = pad + digits + result;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
{
|
|
92
|
+
carry = high % BASE;
|
|
93
|
+
t = 0x100000000 * carry + low;
|
|
94
|
+
digits = '' + t % BASE;
|
|
95
|
+
|
|
96
|
+
return sign + digits + result;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
module.exports = readInt8;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pg-int8",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "64-bit big-endian signed integer-to-string conversion",
|
|
5
|
+
"bugs": "https://github.com/charmander/pg-int8/issues",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.js"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/charmander/pg-int8"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "tap test"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@charmander/eslint-config-base": "1.0.2",
|
|
19
|
+
"tap": "10.7.3"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=4.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
exports.parse = function (source, transform) {
|
|
4
|
+
return new ArrayParser(source, transform).parse()
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
class ArrayParser {
|
|
8
|
+
constructor (source, transform) {
|
|
9
|
+
this.source = source
|
|
10
|
+
this.transform = transform || identity
|
|
11
|
+
this.position = 0
|
|
12
|
+
this.entries = []
|
|
13
|
+
this.recorded = []
|
|
14
|
+
this.dimension = 0
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
isEof () {
|
|
18
|
+
return this.position >= this.source.length
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
nextCharacter () {
|
|
22
|
+
var character = this.source[this.position++]
|
|
23
|
+
if (character === '\\') {
|
|
24
|
+
return {
|
|
25
|
+
value: this.source[this.position++],
|
|
26
|
+
escaped: true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
value: character,
|
|
31
|
+
escaped: false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
record (character) {
|
|
36
|
+
this.recorded.push(character)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
newEntry (includeEmpty) {
|
|
40
|
+
var entry
|
|
41
|
+
if (this.recorded.length > 0 || includeEmpty) {
|
|
42
|
+
entry = this.recorded.join('')
|
|
43
|
+
if (entry === 'NULL' && !includeEmpty) {
|
|
44
|
+
entry = null
|
|
45
|
+
}
|
|
46
|
+
if (entry !== null) entry = this.transform(entry)
|
|
47
|
+
this.entries.push(entry)
|
|
48
|
+
this.recorded = []
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
consumeDimensions () {
|
|
53
|
+
if (this.source[0] === '[') {
|
|
54
|
+
while (!this.isEof()) {
|
|
55
|
+
var char = this.nextCharacter()
|
|
56
|
+
if (char.value === '=') break
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
parse (nested) {
|
|
62
|
+
var character, parser, quote
|
|
63
|
+
this.consumeDimensions()
|
|
64
|
+
while (!this.isEof()) {
|
|
65
|
+
character = this.nextCharacter()
|
|
66
|
+
if (character.value === '{' && !quote) {
|
|
67
|
+
this.dimension++
|
|
68
|
+
if (this.dimension > 1) {
|
|
69
|
+
parser = new ArrayParser(this.source.substr(this.position - 1), this.transform)
|
|
70
|
+
this.entries.push(parser.parse(true))
|
|
71
|
+
this.position += parser.position - 2
|
|
72
|
+
}
|
|
73
|
+
} else if (character.value === '}' && !quote) {
|
|
74
|
+
this.dimension--
|
|
75
|
+
if (!this.dimension) {
|
|
76
|
+
this.newEntry()
|
|
77
|
+
if (nested) return this.entries
|
|
78
|
+
}
|
|
79
|
+
} else if (character.value === '"' && !character.escaped) {
|
|
80
|
+
if (quote) this.newEntry(true)
|
|
81
|
+
quote = !quote
|
|
82
|
+
} else if (character.value === ',' && !quote) {
|
|
83
|
+
this.newEntry()
|
|
84
|
+
} else {
|
|
85
|
+
this.record(character.value)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (this.dimension !== 0) {
|
|
89
|
+
throw new Error('array dimension not balanced')
|
|
90
|
+
}
|
|
91
|
+
return this.entries
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function identity (value) {
|
|
96
|
+
return value
|
|
97
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "postgres-array",
|
|
3
|
+
"main": "index.js",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"description": "Parse postgres array columns",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "bendrucker/postgres-array",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Ben Drucker",
|
|
10
|
+
"email": "bvdrucker@gmail.com",
|
|
11
|
+
"url": "bendrucker.me"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=4"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "standard && tape test.js"
|
|
18
|
+
},
|
|
19
|
+
"types": "index.d.ts",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"postgres",
|
|
22
|
+
"array",
|
|
23
|
+
"parser"
|
|
24
|
+
],
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"standard": "^12.0.1",
|
|
28
|
+
"tape": "^4.0.0"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"index.js",
|
|
32
|
+
"index.d.ts",
|
|
33
|
+
"readme.md"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# postgres-array [](https://travis-ci.org/bendrucker/postgres-array)
|
|
2
|
+
|
|
3
|
+
> Parse postgres array columns
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install --save postgres-array
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var postgresArray = require('postgres-array')
|
|
17
|
+
|
|
18
|
+
postgresArray.parse('{1,2,3}', (value) => parseInt(value, 10))
|
|
19
|
+
//=> [1, 2, 3]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## API
|
|
23
|
+
|
|
24
|
+
#### `parse(input, [transform])` -> `array`
|
|
25
|
+
|
|
26
|
+
##### input
|
|
27
|
+
|
|
28
|
+
*Required*
|
|
29
|
+
Type: `string`
|
|
30
|
+
|
|
31
|
+
A Postgres array string.
|
|
32
|
+
|
|
33
|
+
##### transform
|
|
34
|
+
|
|
35
|
+
Type: `function`
|
|
36
|
+
Default: `identity`
|
|
37
|
+
|
|
38
|
+
A function that transforms non-null values inserted into the array.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
MIT © [Ben Drucker](http://bendrucker.me)
|