decocms 2.312.6 → 2.312.7
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--E7UrpAr.js → AlertCircle-C2o5q6vc.js} +1 -1
- package/dist/client/assets/{Archive-D0ENLr1k.js → Archive-DFar6uKs.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-CIQd7Thm.js → ArrowNarrowLeft-Dc1sniQF.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Dj7chErN.js → ArrowUpRight-DoW21rsG.js} +1 -1
- package/dist/client/assets/{Check-C_Bp7Lkb.js → Check-C6Q1bblL.js} +1 -1
- package/dist/client/assets/{CheckCircle-9G-pL5Yz.js → CheckCircle-BAZINfwL.js} +1 -1
- package/dist/client/assets/{ChevronDown-XYfullCn.js → ChevronDown-CLABqX5x.js} +1 -1
- package/dist/client/assets/{ChevronRight-BoP1zu-d.js → ChevronRight-srFzWZbn.js} +1 -1
- package/dist/client/assets/{ChevronUp-BOtuvBeQ.js → ChevronUp-CYhx7PBM.js} +1 -1
- package/dist/client/assets/{Container-BnqqIRxQ.js → Container-CDeA-o5s.js} +1 -1
- package/dist/client/assets/{DotsVertical-C8L9nh0Y.js → DotsVertical-Cr_XWVYH.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CRh2Avtv.js → LayoutLeft-D10kQiES.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CsvNVKSe.js → LinkExternal01-D7Bf92jL.js} +1 -1
- package/dist/client/assets/{Lock01-BfkT1rLN.js → Lock01-B5nxky6K.js} +1 -1
- package/dist/client/assets/{Palette-C_x81RzA.js → Palette-BzdGUPw1.js} +1 -1
- package/dist/client/assets/{Play-BGKlvj8h.js → Play-Cv1sPHtp.js} +1 -1
- package/dist/client/assets/{Plus-CoyZs5M_.js → Plus-D7J-ZpF_.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BTQrYDoS.js → RefreshCcw01-1mb0qscd.js} +1 -1
- package/dist/client/assets/{SearchMd-CqfIDBLz.js → SearchMd-B0Lvg3Xk.js} +1 -1
- package/dist/client/assets/{Settings02-Bj1bohUt.js → Settings02-CxQQ6hnP.js} +1 -1
- package/dist/client/assets/{Shield01-D9x40AM1.js → Shield01-CWlsOsl1.js} +1 -1
- package/dist/client/assets/{Star01-Dezh7tEC.js → Star01-DxYo9bx0.js} +1 -1
- package/dist/client/assets/{Sun-CF_fZ8z_.js → Sun-C3FNZe_T.js} +1 -1
- package/dist/client/assets/{Tool01-yEmwHppq.js → Tool01-8PZBFCSr.js} +1 -1
- package/dist/client/assets/{Trash01-CfYXqAgk.js → Trash01-sqipAjJs.js} +1 -1
- package/dist/client/assets/{User01-nyGmAcbb.js → User01-CMGdQkcX.js} +1 -1
- package/dist/client/assets/{Users03-CC5zD4NC.js → Users03-B2lBHlGZ.js} +1 -1
- package/dist/client/assets/{X-_H3PwZ-x.js → X-UcFDhK-I.js} +1 -1
- package/dist/client/assets/{XCircle-DlAAwHo3.js → XCircle-Rqvc6PWM.js} +1 -1
- package/dist/client/assets/{XClose-DJ6uZIFi.js → XClose-BEPgM0J7.js} +1 -1
- package/dist/client/assets/{Zap-DAhFCcSC.js → Zap-CV9G-Zfk.js} +1 -1
- package/dist/client/assets/{ZapSquare-BQR205kq.js → ZapSquare-BTR8NCmq.js} +1 -1
- package/dist/client/assets/{accordion-BUvTDbcS.js → accordion-CvWJabH1.js} +1 -1
- package/dist/client/assets/{agent-icon-pqJUo1bp.js → agent-icon-D6T8ZDaV.js} +1 -1
- package/dist/client/assets/{agents-list-RvvpkzOh.js → agents-list-DyNXshyO.js} +1 -1
- package/dist/client/assets/{ai-providers-CXyEZeAJ.js → ai-providers-7aj7Dvnr.js} +1 -1
- package/dist/client/assets/{alert-dialog-D1FQBcc3.js → alert-dialog-CL1ufXLZ.js} +1 -1
- package/dist/client/assets/{auth-catchall-ol1v2Hpr.js → auth-catchall-B-Lg7W2q.js} +1 -1
- package/dist/client/assets/{automation-list-row-BTS2cEDn.js → automation-list-row-CKuBxKCh.js} +1 -1
- package/dist/client/assets/{automations-BsVY7Fq2.js → automations-b35IyYNi.js} +1 -1
- package/dist/client/assets/{avatar-C-x5h3du.js → avatar-Cz84VRfi.js} +1 -1
- package/dist/client/assets/{badge-B5O2UAE8.js → badge-BDIezRWl.js} +1 -1
- package/dist/client/assets/{brand-context-CYXLTPxr.js → brand-context-Bw8yIqM4.js} +1 -1
- package/dist/client/assets/{card-DDt5rBOW.js → card-BkUSFoeH.js} +1 -1
- package/dist/client/assets/{chat-context-B0CrrMvm.js → chat-context-COr23Pvp.js} +1 -1
- package/dist/client/assets/{checkbox-DdbawBjt.js → checkbox-D9uJNURD.js} +1 -1
- package/dist/client/assets/{collection-detail-BQGTMUz_.js → collection-detail-r3yDw2nE.js} +1 -1
- package/dist/client/assets/{collection-display-button-BME188lN.js → collection-display-button-BkhKa8Fq.js} +1 -1
- package/dist/client/assets/{collection-search-DnJUOSiV.js → collection-search-CC32ghxz.js} +1 -1
- package/dist/client/assets/{collection-search-ClTmOQtV.js → collection-search-CYRwFc6W.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-jsYib-z5.js → collection-table-wrapper-CsPeZBHE.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bv32FI82.js → collection-tabs-DjuikHg2.js} +1 -1
- package/dist/client/assets/{collections-C2GekKfD.js → collections-h6SIG2VD.js} +1 -1
- package/dist/client/assets/{command-4tV0tWXg.js → command-B6Opzxt3.js} +1 -1
- package/dist/client/assets/{connection-card-D9M-U0UE.js → connection-card-Do5z7MRC.js} +1 -1
- package/dist/client/assets/{connection-detail-W-i4n_V0.js → connection-detail-CCkyT_oS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-PKzSpxAP.js → connection-form-helpers-DTUZBSNs.js} +1 -1
- package/dist/client/assets/{connections-CFyWQjm7.js → connections-D1l0zvWe.js} +1 -1
- package/dist/client/assets/{constants-ChOKU-PU.js → constants-CkJVGrih.js} +1 -1
- package/dist/client/assets/{constants-K_0FCyet.js → constants-eHuCaQ_P.js} +1 -1
- package/dist/client/assets/{dialog-DLvaCZhi.js → dialog-BCrxZaWW.js} +1 -1
- package/dist/client/assets/{domain-settings-lkafeUQo.js → domain-settings-DjfYV1So.js} +1 -1
- package/dist/client/assets/{drawer-e4igmw2U.js → drawer-CAqFFbhs.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B8cH2K9_.js → dropdown-menu-CapVicMN.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-C5NDBdyq.js → dynamic-plugin-layout-vfq9KprT.js} +1 -1
- package/dist/client/assets/{empty-state-_hM6S73f.js → empty-state-CyNHLjJr.js} +1 -1
- package/dist/client/assets/{empty-state-xC0Hjgxk.js → empty-state-DrcmKKqy.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dn4BJH0J.js → extract-connection-data-DkJkN3o2.js} +1 -1
- package/dist/client/assets/{features-DlZAVmim.js → features-C2-XIDYj.js} +1 -1
- package/dist/client/assets/{form-BeBxrBEq.js → form-te3NdICa.js} +1 -1
- package/dist/client/assets/{general-iTpBfhZ3.js → general-B-vosNM8.js} +1 -1
- package/dist/client/assets/{index-BRY25LXZ.js → index-5jrl6Co-.js} +2 -2
- package/dist/client/assets/{index-BSuvPrwU.js → index-BKbuKSG2.js} +1 -1
- package/dist/client/assets/{index-BMva3-9T.js → index-BRxzMJGJ.js} +1 -1
- package/dist/client/assets/{index-713BaADI.js → index-B_6WEs0q.js} +1 -1
- package/dist/client/assets/{index-nrobA16R.js → index-Bg-dgfxo.js} +1 -1
- package/dist/client/assets/{index-Ck8rOeRC.js → index-C7jN5neb.js} +1 -1
- package/dist/client/assets/{index-BjpkEK9E.js → index-CBCw04gM.js} +1 -1
- package/dist/client/assets/{index-x7mx8TiN.js → index-CKCUmH_m.js} +3 -3
- package/dist/client/assets/{index-CWtyRHnw.js → index-C_gN6VMh.js} +1 -1
- package/dist/client/assets/{index-D_QVZZhC.js → index-C_s96l4K.js} +1 -1
- package/dist/client/assets/{index-B4qEuPcM.js → index-CkV3bKsF.js} +1 -1
- package/dist/client/assets/{index-o9XsekIm.js → index-Csm4dluq.js} +1 -1
- package/dist/client/assets/{index-BO0Inq7t.js → index-CwW_wLKg.js} +1 -1
- package/dist/client/assets/{index-DDOld6Hj.js → index-Dt8YClUX.js} +1 -1
- package/dist/client/assets/{index-CuUtTo4R.js → index-fexbvrAq.js} +1 -1
- package/dist/client/assets/{index-sv_5_jW0.js → index-zwJpQueu.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C1nf2zRF.js → infiniteQueryObserver-DUrDxQsV.js} +1 -1
- package/dist/client/assets/{input-g22460I-.js → input-D-ZjkErJ.js} +1 -1
- package/dist/client/assets/{integration-icon-BkoK_Zpp.js → integration-icon-Cnjj_f25.js} +1 -1
- package/dist/client/assets/{label-CB2xWKDz.js → label-BYocE4uU.js} +1 -1
- package/dist/client/assets/{layout-O8BY7YMT.js → layout-DZBilHGN.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-C5kJnWTY.js → lean-canvas-recruit-modal-DTNkFQF7.js} +1 -1
- package/dist/client/assets/{login-BAjANqId.js → login-TpNdCcSE.js} +1 -1
- package/dist/client/assets/{members-DdZ1NeQN.js → members-Bc9_guMN.js} +1 -1
- package/dist/client/assets/{monaco-editor-DlTcdq5f.js → monaco-editor-Bk3MeNtT.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BdyzlkVq.js → monitoring-stats-row-atuJDMtL.js} +1 -1
- package/dist/client/assets/{oauth-callback-WBrarn1K.js → oauth-callback-BU51YAFZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-RNILsOLP.js → oauth-callback-ai-provider-DHobA1oV.js} +1 -1
- package/dist/client/assets/{onboarding-DyswWi3n.js → onboarding-xa_XNWs7.js} +1 -1
- package/dist/client/assets/{org-layout-DUCy6vsu.js → org-layout-DfZsgPJH.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DHoq95_4.js → org-plugin-layout-BNtiSb4W.js} +1 -1
- package/dist/client/assets/{pair-DHYTbtVI.js → pair-DlFSBO5g.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cmk2xH9Y.js → plugin-empty-state-B9V3iWPP.js} +1 -1
- package/dist/client/assets/{plugin-header-9qVbYUa2.js → plugin-header-Sl8TyoFF.js} +1 -1
- package/dist/client/assets/{plugin-layout-CFpRp241.js → plugin-layout-rl6DCWgI.js} +1 -1
- package/dist/client/assets/{popover-BTKCLXDn.js → popover-Dn4j0mPz.js} +1 -1
- package/dist/client/assets/{profile-Bv6bMhaY.js → profile-DUg1r9pS.js} +1 -1
- package/dist/client/assets/{project-app-view-e8_e4R8S.js → project-app-view-Ba31KrUb.js} +1 -1
- package/dist/client/assets/registry-EC12Boik.js +2 -0
- package/dist/client/assets/{registry-layout-CbP8TcT_.js → registry-layout-ZGApx0j6.js} +1 -1
- package/dist/client/assets/{required-auth-layout-bGbsPRe1.js → required-auth-layout-DZwCJHl_.js} +1 -1
- package/dist/client/assets/{reset-password-ftD4VHiA.js → reset-password-DPn3UIPm.js} +1 -1
- package/dist/client/assets/{roles-BPdqIQwH.js → roles-CKivK7GA.js} +1 -1
- package/dist/client/assets/{scroll-area-Bd7rJlST.js → scroll-area-CEHywN8A.js} +1 -1
- package/dist/client/assets/{search-input-C7xe1zP3.js → search-input-DQUdthWP.js} +1 -1
- package/dist/client/assets/{select-CRjOFVsl.js → select-B5UhPE3o.js} +1 -1
- package/dist/client/assets/{select-model-DaqlG4E9.js → select-model-CTDZYKlK.js} +1 -1
- package/dist/client/assets/{settings-layout-fOFpl38H.js → settings-layout-C7k8LFse.js} +1 -1
- package/dist/client/assets/{settings-section-DS7ApbzG.js → settings-section-CLiE2XoW.js} +1 -1
- package/dist/client/assets/{shell-layout-DCTWNnYh.js → shell-layout-CSQshMOg.js} +1 -1
- package/dist/client/assets/{sidebar-G21X9kgh.js → sidebar-yJ2bKdp0.js} +1 -1
- package/dist/client/assets/{skeleton-CLaDxckX.js → skeleton-DO9x4Rmx.js} +1 -1
- package/dist/client/assets/{spinner-aHtyyvs3.js → spinner-DKEalby6.js} +1 -1
- package/dist/client/assets/{sso-DG6fo7Wz.js → sso-DOSWI8BP.js} +1 -1
- package/dist/client/assets/{store-Co--1mXW.js → store-D5UphBa3.js} +1 -1
- package/dist/client/assets/store-registry-DipUkX4F.js +2 -0
- package/dist/client/assets/{switch-BCi_tNrV.js → switch-DnFBbNMj.js} +1 -1
- package/dist/client/assets/{table-DKQMevzB.js → table-4kNaNJRz.js} +1 -1
- package/dist/client/assets/{tabs-D5qvY9dA.js → tabs-B-6zDMoB.js} +1 -1
- package/dist/client/assets/{task-status-CLd6IVO0.js → task-status-CH2K09YA.js} +1 -1
- package/dist/client/assets/{textarea-DU6sgZef.js → textarea-4YHnq21B.js} +1 -1
- package/dist/client/assets/{toggle-group-BYdg659y.js → toggle-group-ClNyHH4s.js} +1 -1
- package/dist/client/assets/{tools-list-CxlLpio7.js → tools-list-B79oEyUv.js} +1 -1
- package/dist/client/assets/{tooltip-CaFNQbaH.js → tooltip-CBWMgMUA.js} +1 -1
- package/dist/client/assets/{types-BcO5bOr1.js → types-DzQyumzv.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CMl8n2RP.js → use-ai-providers-6IUbUXz_.js} +1 -1
- package/dist/client/assets/{use-collections-B18X79ey.js → use-collections-fNwAKHqm.js} +1 -1
- package/dist/client/assets/{use-connection-D-Y5WZLa.js → use-connection-kZb9ifhw.js} +1 -1
- package/dist/client/assets/{use-copy-C1Kl6cer.js → use-copy-B9Cl132r.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5acPMBL.js → use-create-virtual-mcp-D4YXt-ZE.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DTP9ZFm1.js → use-debounced-autosave-BsxczRNv.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DCwOC8tQ.js → use-decopilot-events-BHxLXAgz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CuUEXsMJ.js → use-delete-connection-DzBX3Y5X.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BrvZ5kNc.js → use-infinite-scroll-DC9PNnqU.js} +1 -1
- package/dist/client/assets/{use-list-state-CYrR4koF.js → use-list-state-Cm9upsvA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-p5eNuRu_.js → use-mcp-tools-CwvPDTWi.js} +1 -1
- package/dist/client/assets/{use-members-asX6PNtQ.js → use-members-ClIilp4X.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-re2UjJnQ.js → use-navigate-to-agent-DYmmiFA6.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Y6P_21Nx.js → use-org-auth-client-DgUDC_02.js} +1 -1
- package/dist/client/assets/{use-org-sso-j8HePnUG.js → use-org-sso-DnHHFQsb.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D7hbxwdc.js → use-organization-roles-Bz3GUN0h.js} +1 -1
- package/dist/client/assets/{use-organization-settings-8Xiyp7J6.js → use-organization-settings-DfjHTWfJ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-IbCOWAWk.js → use-registry-connections-B6kptdp7.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B8tKxqE4.js → use-status-sounds-BqG86mfx.js} +1 -1
- package/dist/client/assets/{use-tasks-jUiBKFWl.js → use-tasks-POUiiV_o.js} +1 -1
- package/dist/client/assets/{use-view-mode-CJVMuzSM.js → use-view-mode-CrZp_Guy.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DLuIO4Fw.js → use-virtual-mcp-BQvDkFLT.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BiqW5IFh.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-ZvSBUcQH.js +1 -0
- package/dist/client/assets/{user-a1mAL36G.js → user-DSZMPWc6.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D2MfIulL.js → view-mode-toggle-Cgp8wSpL.js} +1 -1
- package/dist/client/assets/{workflow-73m9n75X.js → workflow-Dywulu_i.js} +1 -1
- package/dist/client/assets/workflow-detail-CnTjiGvc.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +66 -66
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/license +9 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- package/dist/server/node_modules/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/license +9 -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/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +62 -62
- package/package.json +1 -1
- package/dist/client/assets/registry-qNWihn9t.js +0 -2
- package/dist/client/assets/store-registry-CGxsV0jz.js +0 -2
- package/dist/client/assets/useInfiniteQuery-ycBQMtqS.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DkCw-LQn.js +0 -1
- package/dist/client/assets/workflow-detail-80bLLyu0.js +0 -1
- package/dist/server/node_modules/pg-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/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
|
@@ -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,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -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,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"maxdepth": 4,
|
|
3
|
+
"maxstatements": 200,
|
|
4
|
+
"maxcomplexity": 12,
|
|
5
|
+
"maxlen": 80,
|
|
6
|
+
"maxparams": 5,
|
|
7
|
+
|
|
8
|
+
"curly": true,
|
|
9
|
+
"eqeqeq": true,
|
|
10
|
+
"immed": true,
|
|
11
|
+
"latedef": false,
|
|
12
|
+
"noarg": true,
|
|
13
|
+
"noempty": true,
|
|
14
|
+
"nonew": true,
|
|
15
|
+
"undef": true,
|
|
16
|
+
"unused": "vars",
|
|
17
|
+
"trailing": true,
|
|
18
|
+
|
|
19
|
+
"quotmark": true,
|
|
20
|
+
"expr": true,
|
|
21
|
+
"asi": true,
|
|
22
|
+
|
|
23
|
+
"browser": false,
|
|
24
|
+
"esnext": true,
|
|
25
|
+
"devel": false,
|
|
26
|
+
"node": false,
|
|
27
|
+
"nonstandard": false,
|
|
28
|
+
|
|
29
|
+
"predef": ["require", "module", "__dirname", "__filename"]
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright (c) 2012-2014 Raynos.
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in
|
|
12
|
+
all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# xtend
|
|
2
|
+
|
|
3
|
+
[![browser support][3]][4]
|
|
4
|
+
|
|
5
|
+
[](http://github.com/badges/stability-badges)
|
|
6
|
+
|
|
7
|
+
Extend like a boss
|
|
8
|
+
|
|
9
|
+
xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
var extend = require("xtend")
|
|
15
|
+
|
|
16
|
+
// extend returns a new object. Does not mutate arguments
|
|
17
|
+
var combination = extend({
|
|
18
|
+
a: "a",
|
|
19
|
+
b: "c"
|
|
20
|
+
}, {
|
|
21
|
+
b: "b"
|
|
22
|
+
})
|
|
23
|
+
// { a: "a", b: "b" }
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Stability status: Locked
|
|
27
|
+
|
|
28
|
+
## MIT Licensed
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
[3]: http://ci.testling.com/Raynos/xtend.png
|
|
32
|
+
[4]: http://ci.testling.com/Raynos/xtend
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module.exports = extend
|
|
2
|
+
|
|
3
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4
|
+
|
|
5
|
+
function extend() {
|
|
6
|
+
var target = {}
|
|
7
|
+
|
|
8
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
9
|
+
var source = arguments[i]
|
|
10
|
+
|
|
11
|
+
for (var key in source) {
|
|
12
|
+
if (hasOwnProperty.call(source, key)) {
|
|
13
|
+
target[key] = source[key]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return target
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module.exports = extend
|
|
2
|
+
|
|
3
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4
|
+
|
|
5
|
+
function extend(target) {
|
|
6
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7
|
+
var source = arguments[i]
|
|
8
|
+
|
|
9
|
+
for (var key in source) {
|
|
10
|
+
if (hasOwnProperty.call(source, key)) {
|
|
11
|
+
target[key] = source[key]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return target
|
|
17
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xtend",
|
|
3
|
+
"version": "4.0.2",
|
|
4
|
+
"description": "extend like a boss",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"extend",
|
|
7
|
+
"merge",
|
|
8
|
+
"options",
|
|
9
|
+
"opts",
|
|
10
|
+
"object",
|
|
11
|
+
"array"
|
|
12
|
+
],
|
|
13
|
+
"author": "Raynos <raynos2@gmail.com>",
|
|
14
|
+
"repository": "git://github.com/Raynos/xtend.git",
|
|
15
|
+
"main": "immutable",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"test": "node test"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"tape": "~1.1.0"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/Raynos/xtend",
|
|
24
|
+
"contributors": [
|
|
25
|
+
{
|
|
26
|
+
"name": "Jake Verbaten"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Matt Esch"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/Raynos/xtend/issues",
|
|
34
|
+
"email": "raynos2@gmail.com"
|
|
35
|
+
},
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"testling": {
|
|
38
|
+
"files": "test.js",
|
|
39
|
+
"browsers": [
|
|
40
|
+
"ie/7..latest",
|
|
41
|
+
"firefox/16..latest",
|
|
42
|
+
"firefox/nightly",
|
|
43
|
+
"chrome/22..latest",
|
|
44
|
+
"chrome/canary",
|
|
45
|
+
"opera/12..latest",
|
|
46
|
+
"opera/next",
|
|
47
|
+
"safari/5.1..latest",
|
|
48
|
+
"ipad/6.0..latest",
|
|
49
|
+
"iphone/6.0..latest"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=0.4"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var test = require("tape")
|
|
2
|
+
var extend = require("./")
|
|
3
|
+
var mutableExtend = require("./mutable")
|
|
4
|
+
|
|
5
|
+
test("merge", function(assert) {
|
|
6
|
+
var a = { a: "foo" }
|
|
7
|
+
var b = { b: "bar" }
|
|
8
|
+
|
|
9
|
+
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
|
10
|
+
assert.end()
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
test("replace", function(assert) {
|
|
14
|
+
var a = { a: "foo" }
|
|
15
|
+
var b = { a: "bar" }
|
|
16
|
+
|
|
17
|
+
assert.deepEqual(extend(a, b), { a: "bar" })
|
|
18
|
+
assert.end()
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test("undefined", function(assert) {
|
|
22
|
+
var a = { a: undefined }
|
|
23
|
+
var b = { b: "foo" }
|
|
24
|
+
|
|
25
|
+
assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
|
|
26
|
+
assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
|
|
27
|
+
assert.end()
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
test("handle 0", function(assert) {
|
|
31
|
+
var a = { a: "default" }
|
|
32
|
+
var b = { a: 0 }
|
|
33
|
+
|
|
34
|
+
assert.deepEqual(extend(a, b), { a: 0 })
|
|
35
|
+
assert.deepEqual(extend(b, a), { a: "default" })
|
|
36
|
+
assert.end()
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
test("is immutable", function (assert) {
|
|
40
|
+
var record = {}
|
|
41
|
+
|
|
42
|
+
extend(record, { foo: "bar" })
|
|
43
|
+
assert.equal(record.foo, undefined)
|
|
44
|
+
assert.end()
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
test("null as argument", function (assert) {
|
|
48
|
+
var a = { foo: "bar" }
|
|
49
|
+
var b = null
|
|
50
|
+
var c = void 0
|
|
51
|
+
|
|
52
|
+
assert.deepEqual(extend(b, a, c), { foo: "bar" })
|
|
53
|
+
assert.end()
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
test("mutable", function (assert) {
|
|
57
|
+
var a = { foo: "bar" }
|
|
58
|
+
|
|
59
|
+
mutableExtend(a, { bar: "baz" })
|
|
60
|
+
|
|
61
|
+
assert.equal(a.bar, "baz")
|
|
62
|
+
assert.end()
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
test("null prototype", function(assert) {
|
|
66
|
+
var a = { a: "foo" }
|
|
67
|
+
var b = Object.create(null)
|
|
68
|
+
b.b = "bar";
|
|
69
|
+
|
|
70
|
+
assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
|
|
71
|
+
assert.end()
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
test("null prototype mutable", function (assert) {
|
|
75
|
+
var a = { foo: "bar" }
|
|
76
|
+
var b = Object.create(null)
|
|
77
|
+
b.bar = "baz";
|
|
78
|
+
|
|
79
|
+
mutableExtend(a, b)
|
|
80
|
+
|
|
81
|
+
assert.equal(a.bar, "baz")
|
|
82
|
+
assert.end()
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
test("prototype pollution", function (assert) {
|
|
86
|
+
var a = {}
|
|
87
|
+
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
|
88
|
+
|
|
89
|
+
assert.strictEqual(a.oops, undefined)
|
|
90
|
+
extend({}, maliciousPayload)
|
|
91
|
+
assert.strictEqual(a.oops, undefined)
|
|
92
|
+
assert.end()
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
test("prototype pollution mutable", function (assert) {
|
|
96
|
+
var a = {}
|
|
97
|
+
var maliciousPayload = '{"__proto__":{"oops":"It works!"}}'
|
|
98
|
+
|
|
99
|
+
assert.strictEqual(a.oops, undefined)
|
|
100
|
+
mutableExtend({}, maliciousPayload)
|
|
101
|
+
assert.strictEqual(a.oops, undefined)
|
|
102
|
+
assert.end()
|
|
103
|
+
})
|