decocms 2.306.0 → 2.306.2

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.
Files changed (196) hide show
  1. package/dist/client/assets/{AlertCircle-ri2xuBKe.js → AlertCircle-CcUtX5uM.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-yxFeL5-Q.js → ArrowNarrowLeft-IKO0Pdme.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-Bxgj2IVp.js → ArrowUpRight-B9ER_pU4.js} +1 -1
  4. package/dist/client/assets/{Check-C6Fa8-x7.js → Check-DVRpvrTF.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-D7N7MOmw.js → CheckCircle-C1PuOF6d.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-DmrzaACF.js → ChevronDown-BgtmJwU7.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-CZ_XAq5W.js → ChevronRight-BxsGpbIW.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-Ds9ufeJd.js → ChevronUp-DvM1tvKw.js} +1 -1
  9. package/dist/client/assets/{Container-BXYDPrF5.js → Container-D_d73BfD.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-CYFsY1AY.js → DotsVertical-CFsox5cs.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-Dvpxn-Ig.js → LinkExternal01-BFJlAOho.js} +1 -1
  12. package/dist/client/assets/{Lock01-63SpB195.js → Lock01-BDVFL4zm.js} +1 -1
  13. package/dist/client/assets/{Palette-D0iAFXNq.js → Palette-C4Za_YQg.js} +1 -1
  14. package/dist/client/assets/{Play-D4xI5B_i.js → Play-CG03drxN.js} +1 -1
  15. package/dist/client/assets/{Plus-CDEOyPu8.js → Plus-BMxmddO-.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-B2ZHRQzo.js → RefreshCcw01-B_PJ5f1k.js} +1 -1
  17. package/dist/client/assets/{SearchMd-6IRfjRcX.js → SearchMd-BH72zEYs.js} +1 -1
  18. package/dist/client/assets/{Settings02-3HEuuiVe.js → Settings02-Bvv_nn0Y.js} +1 -1
  19. package/dist/client/assets/{Shield01-BGj8uiOU.js → Shield01-B-3tcngo.js} +1 -1
  20. package/dist/client/assets/{Star01-BSZxz5Wn.js → Star01-Cdw_hElv.js} +1 -1
  21. package/dist/client/assets/{Sun-DdqVKeEA.js → Sun-ja3JE2c9.js} +1 -1
  22. package/dist/client/assets/{Tool01-DMFP0Svb.js → Tool01-DK9-mVZw.js} +1 -1
  23. package/dist/client/assets/{Trash01-Dj5mVOWm.js → Trash01-D676SGAl.js} +1 -1
  24. package/dist/client/assets/{User01-CDDY3fE9.js → User01-DGJlNaMw.js} +1 -1
  25. package/dist/client/assets/{Users03-BbIOB2XC.js → Users03-CRQrY9LZ.js} +1 -1
  26. package/dist/client/assets/{X-yKx8T0mV.js → X-DZI_qdyG.js} +1 -1
  27. package/dist/client/assets/{XCircle-BLtaN_6O.js → XCircle-BI7HQKdL.js} +1 -1
  28. package/dist/client/assets/{XClose-Bk1D4OG4.js → XClose-DQPB9QhN.js} +1 -1
  29. package/dist/client/assets/{Zap-Ctp20y2W.js → Zap-Dd-DoFdM.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-BOPwjpzz.js → ZapSquare-DZh8af5t.js} +1 -1
  31. package/dist/client/assets/{accordion-Cp5pOFIt.js → accordion-BqJi9w98.js} +1 -1
  32. package/dist/client/assets/{agent-icon-6IsHLhhx.js → agent-icon-BpIPT-PU.js} +1 -1
  33. package/dist/client/assets/{agents-list-2IMNAAmL.js → agents-list-C92sGcpj.js} +1 -1
  34. package/dist/client/assets/ai-providers-Bi9o279v.js +1 -0
  35. package/dist/client/assets/{alert-dialog-D-vKhXAM.js → alert-dialog-DZnXWtkc.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-DSDUVS7V.js → auth-catchall-BlSxNcbF.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-DXQ1xbHt.js → automation-list-row-BjkF6IP8.js} +1 -1
  38. package/dist/client/assets/{automations-BKGLmUCl.js → automations-Dk44qwnk.js} +1 -1
  39. package/dist/client/assets/{avatar-DiYo_VFp.js → avatar-EJ4rWeJV.js} +1 -1
  40. package/dist/client/assets/{badge-v1Fnh_-2.js → badge-CMhkMPpc.js} +1 -1
  41. package/dist/client/assets/{brand-context-DWyvnvIk.js → brand-context-DHKafDne.js} +1 -1
  42. package/dist/client/assets/{card-CMatfPs6.js → card-DfBr11OH.js} +1 -1
  43. package/dist/client/assets/{chat-context-BOGVHhEC.js → chat-context-DfNQ7f-M.js} +1 -1
  44. package/dist/client/assets/{checkbox-DgRshC0u.js → checkbox-CsVxpSNu.js} +1 -1
  45. package/dist/client/assets/{collection-detail-D8ViAcbL.js → collection-detail-D3z0bht4.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-BEIthj-o.js → collection-display-button-CijPjsBx.js} +1 -1
  47. package/dist/client/assets/{collection-search-CLwC-feE.js → collection-search-CUzZkask.js} +1 -1
  48. package/dist/client/assets/{collection-search-Dsu0rnLF.js → collection-search-DDXROr4Y.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-Df3XEjUz.js → collection-table-wrapper-BJIOgEuU.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-3zydPpJg.js → collection-tabs-Sh1c6Hp3.js} +1 -1
  51. package/dist/client/assets/{collections-DIZVbUQW.js → collections-B6H9755O.js} +1 -1
  52. package/dist/client/assets/{command-Cb8AzRR0.js → command-CN0wol1M.js} +1 -1
  53. package/dist/client/assets/{connection-card-CN5pQMAi.js → connection-card-t8q3avUo.js} +1 -1
  54. package/dist/client/assets/{connection-detail-DMf-fgcD.js → connection-detail-_U-y0yZK.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-0uGtdPq8.js → connection-form-helpers-CDqLkd8a.js} +1 -1
  56. package/dist/client/assets/{connections-oG85p-mQ.js → connections-B7soayai.js} +1 -1
  57. package/dist/client/assets/{constants-hjtpWhr_.js → constants-Hpdlytpy.js} +1 -1
  58. package/dist/client/assets/{constants-BBSLGS7p.js → constants-RvCh42kd.js} +1 -1
  59. package/dist/client/assets/{dialog-CICi1bFC.js → dialog-sB-RNyMu.js} +1 -1
  60. package/dist/client/assets/{domain-settings-CjSKJW17.js → domain-settings-CfN0XeQj.js} +1 -1
  61. package/dist/client/assets/{drawer-CAsvHZha.js → drawer-DdDu6FoS.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-DVFKsYz3.js → dropdown-menu-Ba10Ub1x.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-BTYFB5Vl.js → dynamic-plugin-layout-DXfaFfD-.js} +1 -1
  64. package/dist/client/assets/{empty-state-Dk0gx8oo.js → empty-state-4KQTPzu7.js} +1 -1
  65. package/dist/client/assets/{empty-state-CwHUFi5m.js → empty-state-oHMUpnK0.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-CvD7TUFj.js → extract-connection-data-CLmSiyTB.js} +1 -1
  67. package/dist/client/assets/{features-vcFr7_NO.js → features-gEXnGXJn.js} +1 -1
  68. package/dist/client/assets/{form-bUi5oN1u.js → form-C8F4itc9.js} +1 -1
  69. package/dist/client/assets/{general-iD0oGniS.js → general-YVhMnlrc.js} +1 -1
  70. package/dist/client/assets/{index-CMnREwkX.js → index-9WMiiDWH.js} +1 -1
  71. package/dist/client/assets/{index-B7e3gTna.js → index-A1kUSxVF.js} +1 -1
  72. package/dist/client/assets/{index-Dg6zk4z0.js → index-B__IE7Zg.js} +1 -1
  73. package/dist/client/assets/{index-k1BGw4YF.js → index-BfH23PIC.js} +1 -1
  74. package/dist/client/assets/{index-C_78kpYQ.js → index-C8Jg2iKl.js} +1 -1
  75. package/dist/client/assets/{index-D9n-W_rO.js → index-CPXgqgtn.js} +2 -2
  76. package/dist/client/assets/{index-BczjQy3M.js → index-CaFhVluQ.js} +1 -1
  77. package/dist/client/assets/{index-CKbPmli4.js → index-Ccbgu0mE.js} +1 -1
  78. package/dist/client/assets/{index-PFIdYUp0.js → index-CsYx-I3w.js} +1 -1
  79. package/dist/client/assets/{index-CBeau-VE.js → index-CzNtdOVE.js} +3 -3
  80. package/dist/client/assets/{index-DM4aujMZ.js → index-DGIpb-N4.js} +1 -1
  81. package/dist/client/assets/{index-BCI_OHNR.js → index-RcpmOMcB.js} +1 -1
  82. package/dist/client/assets/{index-BxSEc3iB.js → index-SKdTLMdd.js} +1 -1
  83. package/dist/client/assets/{index-BOCF3HeX.js → index-Vpu4sPxo.js} +1 -1
  84. package/dist/client/assets/index-s5U-1Asm.js +1 -0
  85. package/dist/client/assets/{index-DWSuPJ_b.js → index-vqBvbw9C.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-DnwZzogs.js → infiniteQueryObserver-BeoG5sU6.js} +1 -1
  87. package/dist/client/assets/{input-Aj2AxbJX.js → input-BYLqJazY.js} +1 -1
  88. package/dist/client/assets/{integration-icon-CNrz8Wxa.js → integration-icon-Btpdnlb-.js} +1 -1
  89. package/dist/client/assets/{label-CuWuUZ3O.js → label-wqfg1Psv.js} +1 -1
  90. package/dist/client/assets/{layout-zn0Mql8j.js → layout-CSZNypzG.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-mlOx896G.js → lean-canvas-recruit-modal-aeSS5EN2.js} +1 -1
  92. package/dist/client/assets/{login-BAIGAZLg.js → login-eSx-pmqu.js} +1 -1
  93. package/dist/client/assets/{members--FDE6tuk.js → members-Dp2QRB1E.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-PZYP8jhf.js → monaco-editor-Bp7vt54e.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-BbRUPAD5.js → monitoring-stats-row-CSfdCe-P.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-BaQ7B2Rx.js → oauth-callback-ChiIJvQB.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-DcbaUyEX.js → oauth-callback-ai-provider-Uj96uOps.js} +1 -1
  98. package/dist/client/assets/{onboarding-h88h3klM.js → onboarding-B_0dDnLd.js} +1 -1
  99. package/dist/client/assets/{org-layout-BBR4isCp.js → org-layout-DokAgJ5h.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-Dl6QtWDy.js → org-plugin-layout-C98RwuLU.js} +1 -1
  101. package/dist/client/assets/{pair-DST-dVfc.js → pair-DYA5r7ea.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-CAfBOmv9.js → plugin-empty-state-j8s8XCj4.js} +1 -1
  103. package/dist/client/assets/{plugin-header-RtXpJdkF.js → plugin-header-BufwzLmI.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-DLTDP8qX.js → plugin-layout-BwLMjrn6.js} +1 -1
  105. package/dist/client/assets/{popover-DFJMwPZz.js → popover-BP8qYbWI.js} +1 -1
  106. package/dist/client/assets/{profile-Bc72ys1m.js → profile-BUq_8Y8L.js} +1 -1
  107. package/dist/client/assets/{project-app-view-k_Cpcixt.js → project-app-view-Xj3yVfXy.js} +1 -1
  108. package/dist/client/assets/registry-BLsA5AO_.js +2 -0
  109. package/dist/client/assets/{registry-layout-Cg78aXMt.js → registry-layout-CZ27EJiP.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-BRdLiCQS.js → required-auth-layout-DxobDViQ.js} +1 -1
  111. package/dist/client/assets/{reset-password-B6r9t9Oh.js → reset-password-BX31j3AV.js} +1 -1
  112. package/dist/client/assets/{roles-Ee_Uhan9.js → roles-dyH1CsHQ.js} +1 -1
  113. package/dist/client/assets/{scroll-area-D7xTqtD-.js → scroll-area-Bazrt5Q_.js} +1 -1
  114. package/dist/client/assets/{search-input-BYHjVlDa.js → search-input-CagM2rOd.js} +1 -1
  115. package/dist/client/assets/{select-DWMsyC47.js → select-DV6XTbu1.js} +1 -1
  116. package/dist/client/assets/{select-model-p3PkjF3m.js → select-model-q-6_EO7e.js} +1 -1
  117. package/dist/client/assets/{settings-layout-B5lxdePw.js → settings-layout-ydozaX1z.js} +1 -1
  118. package/dist/client/assets/{settings-section-DLmXqm7P.js → settings-section-BSSTyi59.js} +1 -1
  119. package/dist/client/assets/{shell-layout-DDd0qO09.js → shell-layout-CCBbSGMK.js} +1 -1
  120. package/dist/client/assets/{skeleton-fTv1xeu9.js → skeleton-eJ5dvmO1.js} +1 -1
  121. package/dist/client/assets/{sso-DPaJITTm.js → sso-D3B4i8mi.js} +1 -1
  122. package/dist/client/assets/store-registry-BizfzILs.js +2 -0
  123. package/dist/client/assets/{store-CAA-krPV.js → store-tol-TExI.js} +1 -1
  124. package/dist/client/assets/{switch-D664sdCn.js → switch-B9P99cpo.js} +1 -1
  125. package/dist/client/assets/{table-mlNAjytE.js → table-BIJ38639.js} +1 -1
  126. package/dist/client/assets/{tabs-Bakk2hgc.js → tabs-C0vV7-ts.js} +1 -1
  127. package/dist/client/assets/{task-status-B1waCh_f.js → task-status-nAuAdX3m.js} +1 -1
  128. package/dist/client/assets/{textarea-B5ocquNh.js → textarea-Dk5HQM76.js} +1 -1
  129. package/dist/client/assets/{toggle-group-CdL7Wi0S.js → toggle-group-DiN3ciV3.js} +1 -1
  130. package/dist/client/assets/{tools-list-C9TFhRWw.js → tools-list-NaHpnv5w.js} +1 -1
  131. package/dist/client/assets/{tooltip-D3G-75TX.js → tooltip-CCRvyunm.js} +1 -1
  132. package/dist/client/assets/{types-iEh-ujpY.js → types-CsuD99pM.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-B5bMFCmc.js → use-ai-providers-Dgd0mo29.js} +1 -1
  134. package/dist/client/assets/{use-collections-D6rFCbFs.js → use-collections-Ra-WueHq.js} +1 -1
  135. package/dist/client/assets/{use-connection-ChcOtrff.js → use-connection-D6QJlUO9.js} +1 -1
  136. package/dist/client/assets/{use-copy-m0n_RO3C.js → use-copy-BHjujE3w.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-YEubcOB4.js → use-create-virtual-mcp-BxdAiHU1.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-B2P6o2k5.js → use-debounced-autosave-C7GmOCQZ.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-2TQ7wYAd.js → use-decopilot-events-DQouP0Xf.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-D5bnzRUU.js → use-delete-connection-1o_zv9iJ.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-3bbSny2Z.js → use-infinite-scroll-CBiQU4Ab.js} +1 -1
  142. package/dist/client/assets/{use-list-state-wMdeexdh.js → use-list-state-COPr6pvf.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-BcOc7oDE.js → use-mcp-tools-DD1IUYEC.js} +1 -1
  144. package/dist/client/assets/{use-members-BNZ3ZVzn.js → use-members-uqCUADFs.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-BpE3mIlu.js → use-navigate-to-agent-DtcXsTmt.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-C94Cx1kj.js → use-org-auth-client-lzEa1Nt5.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-V0U-retN.js → use-org-sso-XYdJdNGD.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-Byz74Exs.js → use-organization-roles-DaSsDuIz.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-Crj_HvGT.js → use-organization-settings-DZQEi_vL.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-BLE97Xkr.js → use-registry-connections-BgfsM9PL.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-BFxmOR4f.js → use-status-sounds-BnOGH79m.js} +1 -1
  152. package/dist/client/assets/{use-tasks-B1IA46S1.js → use-tasks-CP9EEDgQ.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-DmgZ_4mP.js → use-view-mode-DBMTYwcB.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-DbNBWdfU.js → use-virtual-mcp-BNrt8cOn.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-m6hlUQnd.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-BbuXOIpQ.js +1 -0
  157. package/dist/client/assets/{user-BnqvTrf4.js → user-O4Eqd0DY.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-CwkAkApt.js → view-mode-toggle-BDOZY65E.js} +1 -1
  159. package/dist/client/assets/{workflow-R3hZyuyQ.js → workflow-BiwnYTIB.js} +1 -1
  160. package/dist/client/assets/workflow-detail-CHrqPsdS.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +2 -2
  163. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  164. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  165. package/dist/server/node_modules/ansi-styles/license +9 -0
  166. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  167. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  168. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  169. package/dist/server/node_modules/postgres-array/index.js +97 -0
  170. package/dist/server/node_modules/postgres-array/license +21 -0
  171. package/dist/server/node_modules/postgres-array/package.json +35 -0
  172. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  173. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  174. package/dist/server/node_modules/postgres-bytea/license +21 -0
  175. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  176. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  177. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  178. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  179. package/dist/server/node_modules/postgres-interval/license +21 -0
  180. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  181. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  182. package/dist/server/node_modules/split2/LICENSE +13 -0
  183. package/dist/server/node_modules/split2/README.md +85 -0
  184. package/dist/server/node_modules/split2/bench.js +27 -0
  185. package/dist/server/node_modules/split2/index.js +141 -0
  186. package/dist/server/node_modules/split2/package.json +39 -0
  187. package/dist/server/node_modules/split2/test.js +409 -0
  188. package/dist/server/server.js +1 -1
  189. package/package.json +1 -1
  190. package/dist/client/assets/ai-providers-DJCkxeza.js +0 -1
  191. package/dist/client/assets/index-C3jp8V-r.js +0 -1
  192. package/dist/client/assets/registry-BsIc5aMc.js +0 -2
  193. package/dist/client/assets/store-registry-ofreyRMo.js +0 -2
  194. package/dist/client/assets/useInfiniteQuery-CkLPMOdO.js +0 -1
  195. package/dist/client/assets/useSuspenseInfiniteQuery-3g8exEkj.js +0 -1
  196. package/dist/client/assets/workflow-detail-BJ1tXzcM.js +0 -1
@@ -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 [![Build Status](https://travis-ci.org/bendrucker/postgres-array.svg?branch=master)](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)
@@ -0,0 +1,33 @@
1
+ 'use strict'
2
+
3
+ var bufferFrom = Buffer.from || Buffer
4
+
5
+ module.exports = function parseBytea (input) {
6
+ if (/^\\x/.test(input)) {
7
+ // new 'hex' style response (pg >9.0)
8
+ return bufferFrom(input.substr(2), 'hex')
9
+ }
10
+ var output = ''
11
+ var i = 0
12
+ while (i < input.length) {
13
+ if (input[i] !== '\\') {
14
+ output += input[i]
15
+ ++i
16
+ } else {
17
+ if (/[0-7]{3}/.test(input.substr(i + 1, 3))) {
18
+ output += String.fromCharCode(parseInt(input.substr(i + 1, 3), 8))
19
+ i += 4
20
+ } else {
21
+ var backslashes = 1
22
+ while (i + backslashes < input.length && input[i + backslashes] === '\\') {
23
+ backslashes++
24
+ }
25
+ for (var k = 0; k < Math.floor(backslashes / 2); ++k) {
26
+ output += '\\'
27
+ }
28
+ i += Math.floor(backslashes / 2) * 2
29
+ }
30
+ }
31
+ }
32
+ return bufferFrom(output, 'binary')
33
+ }
@@ -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,34 @@
1
+ {
2
+ "name": "postgres-bytea",
3
+ "main": "index.js",
4
+ "version": "1.0.1",
5
+ "description": "Postgres bytea parser",
6
+ "license": "MIT",
7
+ "repository": "bendrucker/postgres-bytea",
8
+ "author": {
9
+ "name": "Ben Drucker",
10
+ "email": "bvdrucker@gmail.com",
11
+ "url": "bendrucker.me"
12
+ },
13
+ "engines": {
14
+ "node": ">=0.10.0"
15
+ },
16
+ "scripts": {
17
+ "test": "standard && tape test.js"
18
+ },
19
+ "keywords": [
20
+ "bytea",
21
+ "postgres",
22
+ "binary",
23
+ "parser"
24
+ ],
25
+ "dependencies": {},
26
+ "devDependencies": {
27
+ "tape": "^4.0.0",
28
+ "standard": "^4.0.0"
29
+ },
30
+ "files": [
31
+ "index.js",
32
+ "readme.md"
33
+ ]
34
+ }
@@ -0,0 +1,34 @@
1
+ # postgres-bytea [![Build Status](https://travis-ci.org/bendrucker/postgres-bytea.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-bytea)
2
+
3
+ > Postgres bytea parser
4
+
5
+
6
+ ## Install
7
+
8
+ ```
9
+ $ npm install --save postgres-bytea
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ var bytea = require('postgres-bytea');
17
+ bytea('\\000\\100\\200')
18
+ //=> buffer
19
+ ```
20
+
21
+ ## API
22
+
23
+ #### `bytea(input)` -> `buffer`
24
+
25
+ ##### input
26
+
27
+ *Required*
28
+ Type: `string`
29
+
30
+ A Postgres bytea binary string.
31
+
32
+ ## License
33
+
34
+ MIT © [Ben Drucker](http://bendrucker.me)
@@ -0,0 +1,20 @@
1
+ declare namespace PostgresInterval {
2
+ export interface IPostgresInterval {
3
+ years?: number;
4
+ months?: number;
5
+ days?: number;
6
+ hours?: number;
7
+ minutes?: number;
8
+ seconds?: number;
9
+ milliseconds?: number;
10
+
11
+ toPostgres(): string;
12
+
13
+ toISO(): string;
14
+ toISOString(): string;
15
+ }
16
+ }
17
+
18
+ declare function PostgresInterval(raw: string): PostgresInterval.IPostgresInterval;
19
+
20
+ export = PostgresInterval;
@@ -0,0 +1,125 @@
1
+ 'use strict'
2
+
3
+ var extend = require('xtend/mutable')
4
+
5
+ module.exports = PostgresInterval
6
+
7
+ function PostgresInterval (raw) {
8
+ if (!(this instanceof PostgresInterval)) {
9
+ return new PostgresInterval(raw)
10
+ }
11
+ extend(this, parse(raw))
12
+ }
13
+ var properties = ['seconds', 'minutes', 'hours', 'days', 'months', 'years']
14
+ PostgresInterval.prototype.toPostgres = function () {
15
+ var filtered = properties.filter(this.hasOwnProperty, this)
16
+
17
+ // In addition to `properties`, we need to account for fractions of seconds.
18
+ if (this.milliseconds && filtered.indexOf('seconds') < 0) {
19
+ filtered.push('seconds')
20
+ }
21
+
22
+ if (filtered.length === 0) return '0'
23
+ return filtered
24
+ .map(function (property) {
25
+ var value = this[property] || 0
26
+
27
+ // Account for fractional part of seconds,
28
+ // remove trailing zeroes.
29
+ if (property === 'seconds' && this.milliseconds) {
30
+ value = (value + this.milliseconds / 1000).toFixed(6).replace(/\.?0+$/, '')
31
+ }
32
+
33
+ return value + ' ' + property
34
+ }, this)
35
+ .join(' ')
36
+ }
37
+
38
+ var propertiesISOEquivalent = {
39
+ years: 'Y',
40
+ months: 'M',
41
+ days: 'D',
42
+ hours: 'H',
43
+ minutes: 'M',
44
+ seconds: 'S'
45
+ }
46
+ var dateProperties = ['years', 'months', 'days']
47
+ var timeProperties = ['hours', 'minutes', 'seconds']
48
+ // according to ISO 8601
49
+ PostgresInterval.prototype.toISOString = PostgresInterval.prototype.toISO = function () {
50
+ var datePart = dateProperties
51
+ .map(buildProperty, this)
52
+ .join('')
53
+
54
+ var timePart = timeProperties
55
+ .map(buildProperty, this)
56
+ .join('')
57
+
58
+ return 'P' + datePart + 'T' + timePart
59
+
60
+ function buildProperty (property) {
61
+ var value = this[property] || 0
62
+
63
+ // Account for fractional part of seconds,
64
+ // remove trailing zeroes.
65
+ if (property === 'seconds' && this.milliseconds) {
66
+ value = (value + this.milliseconds / 1000).toFixed(6).replace(/0+$/, '')
67
+ }
68
+
69
+ return value + propertiesISOEquivalent[property]
70
+ }
71
+ }
72
+
73
+ var NUMBER = '([+-]?\\d+)'
74
+ var YEAR = NUMBER + '\\s+years?'
75
+ var MONTH = NUMBER + '\\s+mons?'
76
+ var DAY = NUMBER + '\\s+days?'
77
+ var TIME = '([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?'
78
+ var INTERVAL = new RegExp([YEAR, MONTH, DAY, TIME].map(function (regexString) {
79
+ return '(' + regexString + ')?'
80
+ })
81
+ .join('\\s*'))
82
+
83
+ // Positions of values in regex match
84
+ var positions = {
85
+ years: 2,
86
+ months: 4,
87
+ days: 6,
88
+ hours: 9,
89
+ minutes: 10,
90
+ seconds: 11,
91
+ milliseconds: 12
92
+ }
93
+ // We can use negative time
94
+ var negatives = ['hours', 'minutes', 'seconds', 'milliseconds']
95
+
96
+ function parseMilliseconds (fraction) {
97
+ // add omitted zeroes
98
+ var microseconds = fraction + '000000'.slice(fraction.length)
99
+ return parseInt(microseconds, 10) / 1000
100
+ }
101
+
102
+ function parse (interval) {
103
+ if (!interval) return {}
104
+ var matches = INTERVAL.exec(interval)
105
+ var isNegative = matches[8] === '-'
106
+ return Object.keys(positions)
107
+ .reduce(function (parsed, property) {
108
+ var position = positions[property]
109
+ var value = matches[position]
110
+ // no empty string
111
+ if (!value) return parsed
112
+ // milliseconds are actually microseconds (up to 6 digits)
113
+ // with omitted trailing zeroes.
114
+ value = property === 'milliseconds'
115
+ ? parseMilliseconds(value)
116
+ : parseInt(value, 10)
117
+ // no zeros
118
+ if (!value) return parsed
119
+ if (isNegative && ~negatives.indexOf(property)) {
120
+ value *= -1
121
+ }
122
+ parsed[property] = value
123
+ return parsed
124
+ }, {})
125
+ }
@@ -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,36 @@
1
+ {
2
+ "name": "postgres-interval",
3
+ "main": "index.js",
4
+ "version": "1.2.0",
5
+ "description": "Parse Postgres interval columns",
6
+ "license": "MIT",
7
+ "repository": "bendrucker/postgres-interval",
8
+ "author": {
9
+ "name": "Ben Drucker",
10
+ "email": "bvdrucker@gmail.com",
11
+ "url": "bendrucker.me"
12
+ },
13
+ "engines": {
14
+ "node": ">=0.10.0"
15
+ },
16
+ "scripts": {
17
+ "test": "standard && tape test.js"
18
+ },
19
+ "keywords": [
20
+ "postgres",
21
+ "interval",
22
+ "parser"
23
+ ],
24
+ "dependencies": {
25
+ "xtend": "^4.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "tape": "^4.0.0",
29
+ "standard": "^12.0.1"
30
+ },
31
+ "files": [
32
+ "index.js",
33
+ "index.d.ts",
34
+ "readme.md"
35
+ ]
36
+ }
@@ -0,0 +1,48 @@
1
+ # postgres-interval [![Build Status](https://travis-ci.org/bendrucker/postgres-interval.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-interval) [![Greenkeeper badge](https://badges.greenkeeper.io/bendrucker/postgres-interval.svg)](https://greenkeeper.io/)
2
+
3
+ > Parse Postgres interval columns
4
+
5
+
6
+ ## Install
7
+
8
+ ```
9
+ $ npm install --save postgres-interval
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ var parse = require('postgres-interval')
17
+ var interval = parse('01:02:03')
18
+ //=> {hours: 1, minutes: 2, seconds: 3}
19
+ interval.toPostgres()
20
+ // 3 seconds 2 minutes 1 hours
21
+ interval.toISO()
22
+ // P0Y0M0DT1H2M3S
23
+ ```
24
+
25
+ ## API
26
+
27
+ #### `parse(pgInterval)` -> `interval`
28
+
29
+ ##### pgInterval
30
+
31
+ *Required*
32
+ Type: `string`
33
+
34
+ A Postgres interval string.
35
+
36
+ #### `interval.toPostgres()` -> `string`
37
+
38
+ Returns an interval string. This allows the interval object to be passed into prepared statements.
39
+
40
+ #### `interval.toISOString()` -> `string`
41
+
42
+ Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string.
43
+
44
+ Also available as `interval.toISO()` for backwards compatibility.
45
+
46
+ ## License
47
+
48
+ MIT © [Ben Drucker](http://bendrucker.me)
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2014-2018, Matteo Collina <hello@matteocollina.com>
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
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
13
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,85 @@
1
+ # Split2(matcher, mapper, options)
2
+
3
+ ![ci](https://github.com/mcollina/split2/workflows/ci/badge.svg)
4
+
5
+ Break up a stream and reassemble it so that each line is a chunk.
6
+ `split2` is inspired by [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) module,
7
+ and it is totally API compatible with it.
8
+ However, it is based on Node.js core [`Transform`](https://nodejs.org/api/stream.html#stream_new_stream_transform_options).
9
+
10
+ `matcher` may be a `String`, or a `RegExp`. Example, read every line in a file ...
11
+
12
+ ``` js
13
+ fs.createReadStream(file)
14
+ .pipe(split2())
15
+ .on('data', function (line) {
16
+ //each chunk now is a separate line!
17
+ })
18
+
19
+ ```
20
+
21
+ `split` takes the same arguments as `string.split` except it defaults to '/\r?\n/', and the optional `limit` paremeter is ignored.
22
+ [String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)
23
+
24
+ `split` takes an optional options object on it's third argument, which
25
+ is directly passed as a
26
+ [Transform](https://nodejs.org/api/stream.html#stream_new_stream_transform_options)
27
+ option.
28
+
29
+ Additionally, the `.maxLength` and `.skipOverflow` options are implemented, which set limits on the internal
30
+ buffer size and the stream's behavior when the limit is exceeded. There is no limit unless `maxLength` is set. When
31
+ the internal buffer size exceeds `maxLength`, the stream emits an error by default. You may also set `skipOverflow` to
32
+ true to suppress the error and instead skip past any lines that cause the internal buffer to exceed `maxLength`.
33
+
34
+ Calling `.destroy` will make the stream emit `close`. Use this to perform cleanup logic
35
+
36
+ ``` js
37
+ var splitFile = function(filename) {
38
+ var file = fs.createReadStream(filename)
39
+
40
+ return file
41
+ .pipe(split2())
42
+ .on('close', function() {
43
+ // destroy the file stream in case the split stream was destroyed
44
+ file.destroy()
45
+ })
46
+ }
47
+
48
+ var stream = splitFile('my-file.txt')
49
+
50
+ stream.destroy() // will destroy the input file stream
51
+ ```
52
+
53
+ # NDJ - Newline Delimited Json
54
+
55
+ `split2` accepts a function which transforms each line.
56
+
57
+ ``` js
58
+ fs.createReadStream(file)
59
+ .pipe(split2(JSON.parse))
60
+ .on('data', function (obj) {
61
+ //each chunk now is a js object
62
+ })
63
+ .on("error", function(error) {
64
+ //handling parsing errors
65
+ })
66
+ ```
67
+
68
+ However, in [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) the mapper
69
+ is wrapped in a try-catch, while here it is not: if your parsing logic can throw, wrap it yourself. Otherwise, you can also use the stream error handling when mapper function throw.
70
+
71
+ # License
72
+
73
+ Copyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>
74
+
75
+ Permission to use, copy, modify, and/or distribute this software for any
76
+ purpose with or without fee is hereby granted, provided that the above
77
+ copyright notice and this permission notice appear in all copies.
78
+
79
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
80
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
81
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
82
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
83
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
84
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
85
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.