@teammy/server 0.2.9 → 0.2.10
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/main.js +2901 -1271
- package/dist/web/assets/Assistant-C9Zo5FN_.js +1 -0
- package/dist/web/assets/Computers-DNIWiHu4.js +5 -0
- package/dist/web/assets/Computers-XUdWIkZr.css +1 -0
- package/dist/web/assets/{Conversation-Dc460fhC.css → Conversation-BVNmvuHR.css} +1 -1
- package/dist/web/assets/Conversation-DiVjLVVt.js +1 -0
- package/dist/web/assets/Dashboard-C6M9c0SB.js +1 -0
- package/dist/web/assets/{Dashboard-wDiUg0LB.css → Dashboard-ChX6TZDn.css} +1 -1
- package/dist/web/assets/Dropdown-BnYLBw2s.js +55 -0
- package/dist/web/assets/Files-CQcAEYH9.js +1 -0
- package/dist/web/assets/{Help-G99-LK4-.js → Help-CDOqVRjJ.js} +131 -33
- package/dist/web/assets/HtmlPreview-BzvYKdju.js +1 -0
- package/dist/web/assets/{Markdown-BgEXVy4-.js → Markdown-zJQlHcvy.js} +4 -4
- package/dist/web/assets/MessageComposer-CBI6RiJq.js +1 -0
- package/dist/web/assets/ResourceLibrary-CEFCe7QW.js +6 -0
- package/dist/web/assets/TerminalPane-BrSy-0jI.css +1 -0
- package/dist/web/assets/TerminalPane-GU69G9Ak.js +22 -0
- package/dist/web/assets/WorkspaceTree-BhDZe1go.js +1 -0
- package/dist/web/assets/file-links-V3R--z0b.js +1 -0
- package/dist/web/assets/index-D9m13C7l.js +12 -0
- package/dist/web/assets/index-qX1GRw9I.css +1 -0
- package/dist/web/downloads/teammy-inbox-skill.zip +0 -0
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +3 -2
- package/node_modules/@fastify/websocket/.gitattributes +2 -0
- package/node_modules/@fastify/websocket/.github/dependabot.yml +53 -0
- package/node_modules/@fastify/websocket/.github/workflows/ci.yml +33 -0
- package/node_modules/@fastify/websocket/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/@fastify/websocket/.github/workflows/release.yml +24 -0
- package/node_modules/@fastify/websocket/LICENSE +21 -0
- package/node_modules/@fastify/websocket/README.md +393 -0
- package/node_modules/@fastify/websocket/eslint.config.js +6 -0
- package/node_modules/@fastify/websocket/index.js +276 -0
- package/node_modules/@fastify/websocket/package.json +79 -0
- package/node_modules/@fastify/websocket/test/base.test.js +785 -0
- package/node_modules/@fastify/websocket/test/hooks.test.js +414 -0
- package/node_modules/@fastify/websocket/test/inject.test.js +174 -0
- package/node_modules/@fastify/websocket/test/router.test.js +890 -0
- package/node_modules/@fastify/websocket/tsconfig.json +3 -0
- package/node_modules/@fastify/websocket/types/index.d.ts +128 -0
- package/node_modules/@fastify/websocket/types/index.tst.ts +261 -0
- package/node_modules/duplexify/.travis.yml +9 -0
- package/node_modules/duplexify/LICENSE +21 -0
- package/node_modules/duplexify/README.md +97 -0
- package/node_modules/duplexify/example.js +21 -0
- package/node_modules/duplexify/index.js +238 -0
- package/node_modules/duplexify/package.json +39 -0
- package/node_modules/duplexify/test.js +339 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/stream-shift/.github/workflows/test.yml +23 -0
- package/node_modules/stream-shift/LICENSE +21 -0
- package/node_modules/stream-shift/README.md +25 -0
- package/node_modules/stream-shift/index.js +21 -0
- package/node_modules/stream-shift/package.json +25 -0
- package/node_modules/stream-shift/test.js +48 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/package.json +15 -2
- package/dist/web/assets/Assistant-CkKCs2G4.js +0 -1
- package/dist/web/assets/Computers-B9wEqpMc.js +0 -4
- package/dist/web/assets/Computers-DBnXVk7q.css +0 -1
- package/dist/web/assets/Conversation-DK5-Q1RB.js +0 -1
- package/dist/web/assets/Dashboard-B2HGjI4a.js +0 -1
- package/dist/web/assets/Files-Du-7z96D.js +0 -1
- package/dist/web/assets/HtmlPreview-Bi3u6-l3.js +0 -1
- package/dist/web/assets/MessageComposer-6eJAo_e7.js +0 -1
- package/dist/web/assets/PillControl-BRPhbHQm.js +0 -1
- package/dist/web/assets/PillControl-CqVA7kIQ.css +0 -1
- package/dist/web/assets/ResourceLibrary-DJ9cxDoc.js +0 -6
- package/dist/web/assets/WorkspaceTree-DUFGMLRi.js +0 -1
- package/dist/web/assets/file-links-Dl1S0Tt0.js +0 -1
- package/dist/web/assets/index-C4EXuXVY.css +0 -1
- package/dist/web/assets/index-xjf37um4.js +0 -66
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.settings-row{min-width:0;font-size:var(--text-sm);justify-content:space-between;align-items:center;gap:24px;padding:14px 0;display:flex}.settings-row-copy{min-width:0}.settings-row-copy small{color:var(--color-muted);font-size:var(--text-xs);overflow-wrap:anywhere;margin-top:4px;line-height:1.6;display:block}.settings-row-control{flex-shrink:0;max-width:65%}.settings-row-control:empty{display:none}.settings-row-copy>label{font-weight:inherit}.settings-list{min-width:0}.settings-status{color:var(--color-muted);font-size:var(--text-xs)}.settings-inline-controls{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;display:flex}.settings-inline-controls>button{min-height:var(--control-compact-height);padding-block:3px}.settings-inline-controls>select{width:200px;min-width:0}.settings-row-control input[type=number]{width:100px}.settings-row-control>select{width:240px;max-width:100%;font-size:var(--text-sm)}.settings-disclosure-heading{text-align:left;width:100%;font-weight:400;font-size:var(--text-sm);background:0 0;border:0;border-radius:0;align-items:center;gap:16px;padding:18px 0;display:flex}.settings-disclosure-heading:hover{color:var(--color-muted);background:0 0}.settings-disclosure-heading>span:first-child{flex:1;min-width:0}.settings-disclosure-summary{color:var(--color-muted);text-overflow:ellipsis;white-space:nowrap;max-width:55%;font-size:var(--text-xs);overflow:hidden}.settings-disclosure-chevron{color:var(--color-muted);display:inline-flex}.settings-disclosure-chevron.expanded{transform:rotate(90deg)}.settings-disclosure-content{padding:0 0 16px}.settings-disclosure-content>.settings-row:first-child{padding-top:8px}.settings-text-action{color:var(--color-muted);font-size:var(--text-sm);background:0 0;border:0;justify-content:flex-start;align-self:flex-start;align-items:center;gap:6px;padding:4px 0;display:inline-flex}.settings-text-action:hover{color:var(--color-text);background:0 0}.settings-connection-guide{background:var(--color-soft);border-radius:var(--radius-md);padding:16px}.settings-connection-guide>p{font-size:var(--text-sm);margin:0 0 12px}.settings-connection-guide .command{background:0 0;border:0;padding:8px 0}.settings-connection-guide a{font-size:var(--text-xs)}.settings-section.stack,.settings-section .stack{gap:16px}.settings-section.stack>h2{margin-bottom:0}.settings-section .stack>.settings-row,.settings-section.stack>.settings-row{padding:8px 0}.settings-section .stack>.settings-disclosure>.settings-disclosure-heading{padding:12px 0}@media (width<=600px){.settings-row{gap:12px}.settings-row:has(select){flex-direction:column;align-items:stretch;gap:8px}.settings-row:has(select) .settings-row-control{max-width:100%}.settings-row-control>select{width:100%}.settings-inline-controls>select{flex:1;width:0}}.segmented-control{grid-template-columns:repeat(var(--segment-count), minmax(0, 1fr));isolation:isolate;background:var(--color-soft);font-size:var(--text-xs);border-radius:999px;max-width:100%;padding:2px;display:inline-grid;position:relative}.segmented-slider{z-index:-1;width:calc((100% - 4px) / var(--segment-count));transform:translateX(calc(var(--segment-index) * 100%));background:var(--color-surface,white);border-radius:999px;transition:transform .16s;position:absolute;top:2px;bottom:2px;left:2px;box-shadow:0 1px 3px #00000012}.segmented-option{cursor:pointer;min-width:60px;position:relative}.segmented-option input{opacity:0;width:100%;height:100%;cursor:inherit;z-index:1;margin:0;position:absolute;inset:0}.segmented-option>span{min-height:calc(var(--control-compact-height) - 4px);text-align:center;white-space:nowrap;color:var(--color-muted);border-radius:999px;padding:3px 10px;line-height:20px;display:block}.segmented-option input:checked+span{color:var(--color-text)}.segmented-option input:focus-visible+span{box-shadow:inset 0 0 0 1px var(--color-input-focus)}.segmented-option:has(input:disabled){cursor:default;opacity:.65}@media (prefers-reduced-motion:reduce){.segmented-slider{transition:none}}@media (width<=640px){.settings-row:has(.segmented-control){flex-wrap:wrap;gap:8px 12px}.settings-row:has(.segmented-control) .settings-row-control{max-width:100%;margin-left:auto}}.toggle-switch{background:var(--color-line);cursor:pointer;border:0;border-radius:999px;flex-shrink:0;justify-content:flex-start;align-items:center;width:48px;height:28px;min-height:28px;padding:3px;display:inline-flex}.toggle-switch>span{background:var(--color-surface);border-radius:50%;flex-shrink:0;width:22px;height:22px;transition:transform .16s}.toggle-switch[aria-checked=true]{background:var(--brand-black)}.toggle-switch[aria-checked=true]>span{transform:translate(20px)}.toggle-switch:disabled{opacity:.45;cursor:default}@media (prefers-reduced-motion:reduce){.toggle-switch>span{transition:none}}.toggle-option{font-size:var(--text-sm);white-space:nowrap;align-items:center;gap:8px;display:inline-flex}.local-agent-members{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px 16px;display:grid}.local-agent-members .check-label{overflow-wrap:anywhere}[data-testid=nav-assistant]{position:relative}.navigation-unread{background:var(--brand-orange);border-radius:50%;width:7px;height:7px;position:absolute;top:-3px;right:-4px}.project-activity{white-space:nowrap;min-width:0;max-width:100%;height:18px;line-height:18px;font-size:var(--text-xs);color:var(--color-muted);flex-shrink:0;align-items:center;gap:5px;margin-top:auto;font-weight:400;display:inline-flex;overflow:hidden}.project-activity-label{text-overflow:ellipsis;min-width:0;overflow:hidden}.project-activity-dot{background:currentColor;border-radius:50%;flex-shrink:0;width:6px;height:6px}.project-activity[data-state=running],.project-activity[data-state=queued]{color:var(--brand-orange)}.project-activity[data-state=failed]{color:var(--color-danger)}.computer-connect-help summary{cursor:pointer;color:var(--color-muted);font-size:var(--text-sm)}.computer-connect-help .command{margin-top:12px}.computer-paths{overflow-wrap:anywhere;color:var(--color-muted);font-size:var(--text-xs);margin:8px 0}.computer-directory-details{flex-direction:column;gap:12px;padding:24px 0;display:flex}.computer-directory-details .computer-paths{margin:0}.computer-directory-purpose{flex-direction:column;gap:8px;display:flex}.computer-directory-purpose>.muted{font-size:var(--text-xs)}.computer-directory-purpose .inline-edit-value{line-height:1.6}.computer-directory-details>.muted{font-size:var(--text-sm)}.computer-settings-section-heading{justify-content:space-between;align-items:center;gap:20px;display:flex}.computer-settings-section-heading h2,.computer-settings-section-heading h3{min-width:0;font-size:var(--text-base);margin:0}.computer-text-action{font-size:var(--text-sm);color:var(--color-muted);background:0 0;border:0;align-items:center;gap:6px;display:inline-flex}.computer-directory-details h3 .inline-edit-value{font-weight:600}@media (width<=640px){.computer-settings-section-heading{flex-wrap:wrap;gap:12px}}.inline-edit{min-width:0;display:block}.inline-edit-value{border-radius:var(--radius-sm);min-height:0;font:inherit;color:inherit;text-align:left;overflow-wrap:anywhere;white-space:pre-wrap;background:0 0;border:0;max-width:100%;padding:0}.inline-edit-value:hover{color:var(--color-muted);background:0 0}.inline-edit-value.empty{color:var(--color-muted)}.inline-edit-fields{align-items:center;gap:6px;display:flex}.inline-edit-fields input,.inline-edit-fields textarea{min-width:0;font:inherit;flex:1}.inline-edit-actions{flex-shrink:0;display:flex}.inline-edit.multiline .inline-edit-fields{flex-direction:column;align-items:stretch}.inline-edit.multiline .inline-edit-actions{align-self:flex-end}.inline-edit-error{font-size:var(--text-sm);color:var(--color-danger);margin-top:6px;font-weight:400;display:block}.routing-section{margin-bottom:36px}.routing-section>h2{font-size:var(--text-base);margin:0 0 8px}.routing-policy-list{margin-top:8px}.connection-state{color:var(--color-muted);font-size:var(--text-xs);margin-left:10px}.routing-connections .settings-row-copy small{max-width:480px}.routing-receivers{padding:0 16px 12px}.routing-inbox-actions{align-items:center;gap:20px;margin:8px 0 12px;display:flex}.routing-inbox-actions a{font-size:var(--text-xs);color:var(--color-muted)}.routing-history{margin-top:18px}.routing-history summary{cursor:pointer;color:var(--color-muted);font-size:var(--text-sm)}.routing-history-item{align-items:center;gap:16px;padding:14px 0;display:flex}.routing-history-item>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--text-sm);flex:1;overflow:hidden}.routing-history-item>small{white-space:nowrap;color:var(--color-muted)}.routing-history-item>select{width:auto;min-width:0;max-width:160px;font-size:var(--text-sm)}@media (width<=700px){.routing-history-item{flex-wrap:wrap}}:root{--brand-black:#161615;--brand-orange:#fd523a;--brand-white:#fefcf5;--brand-cold-white:#fdfefe;--color-canvas:var(--brand-cold-white);--color-text:var(--brand-black);--color-muted:#747a7a;--color-surface:var(--brand-cold-white);--color-soft:#f3f5f5;--color-hover:#edf0f0;--color-line:#e0e5e5;--color-input-focus:var(--brand-orange);--color-accent-soft:#fff0e8;--color-link:#ac3324;--color-danger:#a72d2d;--color-danger-soft:#fff0ec;--color-danger-line:#ebc6bd;--color-on-dark:var(--brand-cold-white);--color-rail-muted:#c6c6c0;--color-rail-hover:#30302c;--color-backdrop:#16161566;--shadow-menu:0 12px 40px #16161514;--shadow-modal:0 24px 80px #16161526;--shadow-floating:0 6px 28px #1616150a;--radius-sm:6px;--radius-md:10px;--radius-lg:16px;--font-body:-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;--font-mono:ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;--text-xs:12px;--text-sm:13px;--text-base:15px;--text-lg:17px;--text-title:28px;--text-project:38px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;--space-7:40px;--space-8:48px;--control-height:44px;--control-compact-height:30px;--sidebar-width:72px;--page-gutter:48px;--pane-width:340px;--line:var(--color-line);--muted:var(--color-muted);font-family:var(--font-body);color:var(--color-text);background:var(--color-canvas);font-synthesis:none;font-size:var(--text-base);--lightningcss-light:initial;--lightningcss-dark: ;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;line-height:1.6}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,textarea,select{font:inherit;color:inherit}button,.button{justify-content:center;align-items:center;gap:var(--space-2);min-height:var(--control-height);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);font-size:var(--text-sm);cursor:pointer;flex-shrink:0;padding:9px 16px;font-weight:550;line-height:22px;text-decoration:none;transition:background-color .12s,color .12s;display:inline-flex}button:hover,.button:hover{background:var(--color-hover)}button:disabled{opacity:.45;cursor:default}button.primary{background:var(--brand-black);border-color:var(--brand-black);color:var(--color-on-dark)}button.primary:hover{background:var(--color-rail-hover)}button.danger{background:var(--color-danger);border-color:var(--color-danger);color:var(--color-on-dark)}:focus-visible{outline:2px solid var(--brand-orange);outline-offset:3px}input,select,textarea{width:100%;min-width:0;min-height:var(--control-height);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);padding:10px 12px}select:not([multiple],[size]){appearance:none;min-height:var(--control-compact-height);font-size:var(--text-sm);text-overflow:ellipsis;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23747a7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-position:right 12px center;background-repeat:no-repeat;background-size:12px;border-radius:999px;padding:4px 34px 4px 14px;line-height:20px}@media (forced-colors:active){select:not([multiple],[size]){appearance:auto;background-image:none}}input::placeholder,textarea::placeholder{color:var(--color-muted)}input:not([type=checkbox],[type=radio],[type=range]):focus,select:focus,textarea:focus{border-color:var(--color-input-focus);outline:none}textarea{resize:vertical}input:disabled,textarea:disabled{background:var(--color-soft);color:var(--color-muted)}input[type=checkbox],input[type=radio]{width:16px;height:16px;min-height:16px;accent-color:var(--brand-black);flex:0 0 16px;margin:0;padding:0}.check-field{width:fit-content;font-size:var(--text-sm);cursor:pointer;align-items:center;gap:8px;display:inline-flex}h1,h2,h3,p{margin:0}h1{font-size:var(--text-title);letter-spacing:-.7px;font-weight:750;line-height:1.35}h2{font-size:22px;font-weight:700;line-height:1.5}h3{font-size:var(--text-lg);font-weight:650}p{color:var(--color-muted);line-height:1.8}small,.muted{font-size:var(--text-sm);color:var(--color-muted)}a{color:var(--color-link);text-underline-offset:4px}code,pre{font-family:var(--font-mono)}fieldset{border:0;min-width:0;margin:0;padding:0}details>summary{cursor:pointer;font-size:var(--text-sm);padding:12px 0}details p{margin:8px 0}dt{color:var(--color-muted)}dd{overflow-wrap:anywhere;margin:0}.summary{font-size:var(--text-sm);grid-template-columns:auto 1fr;gap:8px 18px;margin:12px 0;display:grid}.brand{align-items:center;line-height:1;display:inline-flex}.brand img{width:176px;height:auto;display:block}.brand-compact img{object-fit:contain;width:76px;height:76px}.mascot{object-fit:contain;width:144px;height:144px;display:block}.icon{fill:none;stroke:currentColor;stroke-linejoin:round;stroke-linecap:round;flex-shrink:0}.stack{gap:var(--space-5);flex-direction:column;min-width:0;display:flex}.field{gap:var(--space-2);font-size:var(--text-sm);flex-direction:column;min-width:0;display:flex}.field>span{font-weight:600}.field small{font-weight:400;line-height:1.7}.row{align-items:center;gap:var(--space-2);display:flex}.wrap{flex-wrap:wrap}.actions{justify-content:flex-end;gap:var(--space-2);flex-wrap:wrap;display:flex}.form-grid{gap:var(--space-4);grid-template-columns:minmax(0,1fr) minmax(0,1fr);display:grid}.notice{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-soft);font-size:var(--text-sm);overflow-wrap:anywhere;padding:12px 16px}.notice:empty{display:none}.notice.error{background:var(--color-danger-soft);border-color:var(--color-danger-line);color:var(--color-danger)}.repository-status-card{border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-soft);font-size:var(--text-sm);align-items:flex-start;gap:12px;padding:16px;display:flex}.repository-status-card>svg{flex:none}.repository-status-card strong{display:block}.repository-status-card p{color:var(--color-muted);margin:4px 0 0}.repository-status-card.active{background:var(--color-accent-soft);border-color:var(--color-link);color:var(--color-link)}.repository-status-card.error{background:var(--color-danger-soft);border-color:var(--color-danger-line);color:var(--color-danger)}.error-text{color:var(--color-danger);overflow-wrap:anywhere}.badge{border:1px solid var(--color-line);background:var(--color-soft);border-radius:var(--radius-sm);font-size:var(--text-xs);color:var(--color-muted);vertical-align:middle;align-items:center;padding:2px 8px;line-height:20px;display:inline-flex}.badge.warn{background:var(--color-accent-soft);color:var(--color-link)}.panel{border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);padding:var(--space-5);min-width:0}.panel>h2,.panel>h3{margin-bottom:var(--space-4)}.section-heading{justify-content:space-between;align-items:center;gap:var(--space-3);margin-bottom:var(--space-5);flex-wrap:wrap;display:flex}.section-heading h2{align-items:center;gap:var(--space-3);display:flex}.stack>.section-heading{margin-bottom:0}.count{color:var(--color-muted);margin-left:var(--space-2);font-variant-numeric:tabular-nums;align-items:center;font-size:.75em;font-weight:450;display:inline-flex}.avatar{background:var(--color-soft);width:48px;height:48px;color:var(--color-muted);border-radius:50%;flex-shrink:0;place-items:center;font-size:20px;font-weight:650;display:inline-grid}.avatar.small{width:32px;height:32px;font-size:var(--text-sm)}.empty{text-align:center;color:var(--color-muted);padding:48px 24px}.empty h3{margin-bottom:var(--space-2)}.empty p{font-size:var(--text-sm)}.empty-state{justify-content:center;align-items:center;gap:var(--space-3);text-align:center;padding:var(--space-8) var(--space-5);flex-direction:column;min-width:0;margin:auto;display:flex}.empty-state .mascot{margin-bottom:var(--space-4)}.empty-state>.icon{color:var(--color-muted);margin-bottom:var(--space-2)}.empty-state h3{font-size:var(--text-base);font-weight:600}.empty-state p{max-width:320px;font-size:var(--text-sm)}.icon-button{width:var(--control-height);height:var(--control-height);min-height:var(--control-height);border-radius:var(--radius-md);color:var(--color-text);background:0 0;border:0;flex-shrink:0;justify-content:center;align-items:center;padding:10px;display:inline-flex;position:relative}.icon-button:hover{background:var(--color-hover)}:where(form,dialog,.task-card,.settings-section,.member-card) .icon-button{width:32px;height:32px;min-height:32px;padding:7px}:where(form,dialog,.task-card,.settings-section,.member-card) .icon-button>.icon{width:18px;height:18px}[data-tooltip]:after{content:attr(data-tooltip);z-index:50;border-radius:var(--radius-sm);background:var(--brand-black);color:var(--color-on-dark);white-space:nowrap;font-size:var(--text-xs);visibility:hidden;opacity:0;pointer-events:none;padding:5px 8px;font-weight:400;line-height:1.5;position:absolute;bottom:calc(100% + 6px);right:0}[data-tooltip]:hover:after,[data-tooltip]:focus-visible:after{visibility:visible;opacity:1}[data-tooltip-placement=bottom]:after{top:calc(100% + 6px);bottom:auto}.selection-item{color:inherit;background:0 0;border:0;text-decoration:none}.selection-item:hover{background:0 0}.selection-content{min-width:0;max-width:100%;padding:8px 12px;display:inline-flex;position:relative}.selection-inner{z-index:1;align-items:center;gap:12px;min-width:0;max-width:100%;display:inline-flex;position:relative}.selection-mark{pointer-events:none;fill:none;width:100%;height:100%;stroke:var(--brand-orange);stroke-linecap:round;stroke-linejoin:round;position:absolute;inset:0;overflow:visible}.selection-mark path{stroke-dasharray:1;stroke-dashoffset:0;animation:selection-draw var(--selection-duration) var(--selection-easing) both}.selection-mark .selection-mark-tail{animation-duration:var(--selection-tail-duration);animation-delay:var(--selection-tail-delay)}@keyframes selection-draw{0%{stroke-dashoffset:1px}to{stroke-dashoffset:0}}.selection-item[data-selection-variant=inverse][data-selected=true] .selection-content{background:var(--color-on-dark);color:var(--brand-black);border-radius:var(--radius-md)}.toolbar-actions{align-items:center;gap:var(--space-3);display:flex}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.workspace{min-width:0;min-height:100dvh}.sidebar{z-index:30;width:var(--sidebar-width);background:var(--brand-black);color:var(--color-on-dark);scrollbar-width:none;flex-direction:column;align-items:center;padding:24px 8px;display:flex;position:fixed;inset:0 auto 0 0;overflow-y:auto}.sidebar nav{flex-direction:column;gap:12px;display:flex}.sidebar nav a{width:56px;height:68px;color:var(--color-rail-muted);justify-content:center;align-items:center;padding:0;display:flex;position:relative}.sidebar nav a:hover,.sidebar nav a[aria-current=page]{color:var(--color-on-dark)}.sidebar .selection-inner{flex-direction:column;gap:4px}.sidebar nav .icon{width:26px;height:26px}.navigation-label{font-size:var(--text-xs);font-weight:600;line-height:16px}.main-shell{margin-left:var(--sidebar-width);min-width:0}.workspace-home .main-shell{margin-left:0}.dropdown{min-width:0;position:relative}.dropdown-trigger{text-align:left;background:0 0;border:0;padding:8px 0}.dropdown-trigger:hover{background:0 0}.dropdown-menu{z-index:40;width:320px;max-width:calc(100vw - 40px);max-height:min(480px,70dvh);padding:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-menu);position:absolute;top:calc(100% + 12px);left:0;overflow:auto}.dropdown-menu [role=menuitem]{justify-content:flex-start;align-items:center;gap:var(--space-3);text-align:left;border:0;width:100%;padding:12px;display:flex}.dropdown-menu [role=menuitem]:hover,.dropdown-menu [role=menuitem]:focus-visible{background:var(--color-soft)}.dropdown-menu [role=menuitem]>span{overflow-wrap:anywhere;flex:1;min-width:0}.account-menu-wrap{max-width:160px;margin-left:auto}.account-menu-wrap .dropdown-trigger{max-width:100%;font-size:var(--text-lg)}.account-menu-wrap strong{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.account-menu-wrap .dropdown-menu{width:200px;left:auto;right:0}main#main{padding:48px var(--page-gutter);outline:0;min-width:0}.page-header{justify-content:space-between;align-items:center;gap:var(--space-5);margin-bottom:var(--space-6);display:flex}.page-header p{margin-top:var(--space-2);font-size:var(--text-sm)}.skip-link{z-index:100;background:var(--color-surface);padding:12px;position:fixed;top:-100px;left:12px}.skip-link:focus{top:12px}.file-explorer{height:100dvh;min-height:600px}.file-tree-pane{flex-direction:column;min-width:0;min-height:0;display:flex}.explorer-heading{justify-content:space-between;align-items:center;gap:var(--space-2);flex-shrink:0;min-height:48px;margin-bottom:32px;display:flex}.explorer-heading h1{align-items:center;gap:var(--space-3);letter-spacing:-.5px;min-width:0;font-size:26px;display:flex}[role=tree]{scrollbar-width:thin;min-height:0;padding:4px;overflow:auto}.tree-item{width:100%;min-height:40px;padding:2px 2px 2px calc((var(--tree-level) - 1) * 18px);font-size:var(--text-base);text-align:left;justify-content:flex-start;align-items:center;gap:2px;display:flex}.tree-item:focus-visible{outline-offset:-2px}.tree-item .selection-content{padding-top:5px;padding-bottom:5px}.tree-chevron{width:16px;height:24px;color:var(--color-muted);flex-shrink:0;align-items:center;display:inline-flex}.tree-chevron.expanded{transform:rotate(90deg)}.tree-name{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tree-status{color:var(--color-muted);font-size:var(--text-xs);padding:6px 24px;display:block}.tree-action{min-height:32px;font-size:var(--text-xs);background:0 0;margin:4px 16px;padding:4px 12px}.file-detail,.session-reader{min-width:0;min-height:0;padding:48px var(--page-gutter) 32px;flex-direction:column;display:flex;overflow:hidden}.file-detail-header{justify-content:space-between;align-items:center;gap:var(--space-4);flex-shrink:0;min-height:48px;margin-bottom:32px;display:flex}.file-detail-path{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--text-base);overflow:hidden}.file-detail-path>span{color:var(--color-muted)}.file-detail>.preview-body{flex:1;min-height:0;overflow:auto}.preview-body{min-width:0;padding:0 8px 24px 0}.preview-body-html{flex:1;display:flex}.html-preview{background:0 0;border:0;flex:1;width:100%;min-width:0;min-height:400px;display:block}.file-detail>.notice{margin-bottom:var(--space-3)}.file-entry-retry{align-self:flex-start;margin:12px 0}.raw{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--text-sm);margin:0;line-height:1.8}.markdown{overflow-wrap:anywhere;min-width:0;font-size:16px;line-height:1.85}.markdown h1{font-size:30px}.markdown h2{font-size:23px}.markdown h3{font-size:18px}.markdown h1,.markdown h2,.markdown h3{margin:28px 0 12px}.markdown>:first-child{margin-top:0}.markdown p,.markdown ul,.markdown ol{color:var(--color-text);margin:12px 0}.markdown pre{background:var(--color-soft);border-radius:var(--radius-md);font-size:var(--text-sm);padding:18px;overflow:auto}.markdown code{background:var(--color-soft);border-radius:var(--radius-sm);padding:2px 4px}.markdown pre code{padding:0}.markdown blockquote{border-left:3px solid var(--brand-orange);margin:18px 0;padding:0 18px}.markdown table{border-collapse:collapse;max-width:100%;display:block;overflow:auto}.markdown td,.markdown th{border:1px solid var(--color-line);padding:8px 12px}.markdown input[type=checkbox]{appearance:none;vertical-align:-3px;border:2px solid var(--color-line);opacity:1;background:0 0;border-radius:50%;width:18px;height:18px;min-height:0;margin:0 8px 0 0;padding:0;position:relative}.markdown .task-list-item{list-style:none}.markdown .contains-task-list{padding-left:0}.markdown input[type=checkbox]:checked{border-color:var(--brand-orange)}.markdown input[type=checkbox]:checked:after{content:"";border:solid var(--brand-orange);border-width:0 2px 2px 0;width:5px;height:9px;position:absolute;top:1px;left:4px;transform:rotate(45deg)}.session-explorer{align-items:start;height:auto;min-height:100dvh}.session-explorer>.file-tree-pane{height:100dvh;position:sticky;top:0}.session-explorer .session-reader{min-height:100dvh;overflow:visible}.session-search-dock{z-index:2;border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);width:min(100%,760px);box-shadow:var(--shadow-floating);flex-shrink:0;align-self:center;margin:24px 0 0;padding:10px 14px;position:sticky;bottom:24px}.session-search-input-row{align-items:center;gap:var(--space-2);display:flex}.session-search-input-row input{min-width:0;font-size:var(--text-base);background:0 0;border:0;flex:1;padding:8px 4px}.session-search-input-row input:focus{outline:0}.session-search-dock:focus-within{border-color:var(--color-input-focus)}.search-scope-chip{align-items:center;gap:var(--space-2);border-radius:var(--radius-sm);background:var(--color-hover);max-width:100%;height:22px;min-height:0;color:var(--color-muted);line-height:18px;font-size:var(--text-xs);text-align:left;border:0;padding:2px 6px;display:flex}.search-scope-chip .scope-label{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.search-scope-chip>span:last-child{flex-shrink:0;margin-left:auto}.session-reader-content{flex-direction:column;flex:1;min-height:0;display:flex;overflow:visible}.session-conversation{min-width:0}.conversation-header{padding-bottom:var(--space-5);border-bottom:1px solid var(--color-line)}.conversation-header p{font-size:var(--text-sm);margin-top:var(--space-2)}.session-title{overflow-wrap:anywhere;font-size:22px;line-height:1.5}.session-messages{flex-direction:column;display:flex}.session-message.matched .assistant-bubble{outline:2px solid var(--brand-orange);outline-offset:3px}.session-item{text-align:left;align-items:flex-start;gap:var(--space-2);padding:var(--space-5) 0;border:0;border-bottom:1px solid var(--color-line);background:0 0;border-radius:0;flex-direction:column;display:flex}.session-item>*{overflow-wrap:anywhere;min-width:0;max-width:100%}.session-excerpt{color:var(--color-muted);font-size:var(--text-sm);white-space:normal;font-weight:400}mark.search-highlight{color:inherit;background:linear-gradient(transparent 12%, color-mix(in srgb, var(--brand-orange) 32%, transparent) 12% 90%, transparent 90%);-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:2px;padding:0}.management-page{max-width:1120px;margin:0 auto}.settings-layout{min-height:100dvh}.settings-navigation .page-header{min-height:48px;margin-bottom:32px}.settings-navigation h1{font-size:26px}.settings-tabs{gap:var(--space-3);flex-direction:column;display:flex}.settings-tabs[aria-orientation=horizontal]{gap:var(--space-5);flex-direction:row}.site-settings-content{max-width:800px;padding-top:var(--space-7);margin-top:var(--space-5)}.settings-tabs [role=tab]{font-size:var(--text-base);justify-content:flex-start;padding:2px 4px;font-weight:600}.settings-tabs .lucide-message-circle{transform:scale(.9)}.settings-content{min-width:0;padding:48px var(--page-gutter)}.settings-content [role=tabpanel]{min-width:0;max-width:800px}.settings-section{padding:0 0 var(--space-6)}.settings-section+.settings-section{padding-top:var(--space-4)}.settings-section>h2{margin-bottom:var(--space-5)}.settings-section form,.settings-section>.stack{max-width:800px}.member-list{min-width:0}.member-card{justify-content:space-between;align-items:center;gap:var(--space-4);min-width:0;padding:24px 0;display:flex}.member-heading{align-items:center;gap:var(--space-5);min-width:0;display:flex}.member-heading>div{min-width:0}.member-heading h3{overflow-wrap:anywhere;font-size:19px}.member-heading small{overflow-wrap:anywhere}.member-actions{gap:var(--space-1);display:flex}.form-section-title{margin-top:var(--space-4);padding-top:var(--space-5)}.application-row{gap:var(--space-4);grid-template-columns:90px minmax(0,1fr);padding:20px 0;display:grid}.application-row:last-child{padding-bottom:0}.application-row strong{font-size:var(--text-sm);overflow-wrap:anywhere;font-weight:600}.ai-model-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;padding-top:0}.ai-model-row>div{min-width:0}.ai-model-row small{overflow-wrap:anywhere;display:block}.connect-panel{gap:var(--space-4);flex-direction:column;display:flex}.connect-panel>h2{margin:0}.connect-panel p{font-size:var(--text-sm)}.command{align-items:center;gap:var(--space-2);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-soft);padding:12px;display:flex}.command code{font-size:var(--text-sm);overflow-wrap:anywhere;white-space:pre-wrap;flex:1;min-width:0}.command button{min-height:32px;padding:6px}.scope-path{font-size:var(--text-xs);overflow-wrap:anywhere;color:var(--color-muted);margin-top:20px;padding-top:16px}.model-default-row{padding:8px 0}.settings-section-actions{margin-bottom:var(--space-4);justify-content:flex-end;display:flex}.site-page{max-width:1320px;margin:0 auto}.site-brand-header{justify-content:space-between;align-items:center;gap:var(--space-5);margin-bottom:64px;display:flex}.site-page .page-header{margin-bottom:28px}.site-page .page-header h1{font-size:36px}.project-list{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:28px;display:grid}.project-card{text-align:left;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-canvas);flex-direction:column;align-items:flex-start;gap:24px;min-height:230px;padding:30px;display:flex;position:relative}.project-card:hover{border-color:var(--brand-orange);background:var(--color-canvas)}.project-card>span{min-width:0}.project-card strong{overflow-wrap:anywhere;font-size:22px;display:block}.project-card small{overflow-wrap:anywhere;margin-top:10px;font-weight:400;display:block}.project-card>.icon:last-child{color:var(--color-muted);position:absolute;bottom:28px;right:24px}dialog{border:1px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-canvas);width:calc(100% - 32px);max-width:520px;color:var(--color-text);box-shadow:var(--shadow-modal);max-height:85dvh;padding:0;overflow:auto}dialog::backdrop{background:var(--color-backdrop)}.dialog-content{padding:var(--space-6)}.dialog-header{margin-bottom:var(--space-5);justify-content:space-between;align-items:center;gap:var(--space-3);display:flex}.dialog-header h2{font-size:22px}.boot{gap:var(--space-5);max-width:520px;margin:100px auto;padding:24px;display:grid}.access{grid-template-columns:minmax(280px,42%) minmax(0,1fr);min-height:100dvh;display:grid}.access-aside{background:var(--color-soft);flex-direction:column;padding:40px;display:flex;position:relative;overflow:hidden}.access-art{flex:1;place-items:center;padding:48px 0;display:grid}.access-art .mascot{width:min(100%,450px);height:auto;max-height:45dvh}.access-copy{padding:16px 0 8px}.access-copy h2{letter-spacing:-1px;margin:0;font-size:30px}.access-main{justify-content:center;align-items:center;padding:56px 48px;display:flex}.access-form{gap:var(--space-5);flex-direction:column;width:100%;max-width:380px;display:flex}.access-form>p{font-size:var(--text-sm);margin-top:-10px}.wide{width:100%}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}.sidebar .selection-content{justify-content:center;align-items:center;width:100%;height:100%;padding:8px}.split-layout{grid-template-columns:var(--pane-width) minmax(0, 1fr);display:grid}@media (width<=680px){.settings-tabs[aria-orientation=horizontal]{flex-wrap:wrap;gap:8px 16px}.settings-layout{grid-template-columns:minmax(0,1fr)}.settings-layout .settings-navigation{border-right:0;border-bottom:1px solid var(--color-line);padding:24px 16px 16px}.settings-layout .settings-navigation .page-header{margin-bottom:16px}.settings-layout .settings-tabs{flex-flow:wrap;gap:8px 16px}.settings-layout .settings-content{padding:24px 16px}.file-explorer{grid-template-rows:auto minmax(320px,1fr);grid-template-columns:minmax(0,1fr);height:auto}.file-explorer>.file-tree-pane{border-right:0;border-bottom:1px solid var(--color-line);max-height:36dvh;padding:24px 16px}.file-explorer>.file-detail{min-height:60dvh;padding:24px 16px}}.file-tree-pane,.settings-navigation{border-right:1px solid var(--color-line);padding:48px 24px 32px 28px}main#main:is([data-page=files],[data-page=sessions],[data-page=materials],[data-page=memory],[data-page=help],[data-page=settings]){padding:0}.setup-runtime{color:var(--muted);flex-wrap:wrap;gap:8px 14px;font-size:12px;display:flex}.navigation-label{white-space:nowrap}.resource-library .memory-page{overflow:visible}@media (width<=680px){.resource-library>.file-tree-pane,.help-explorer>.file-tree-pane{height:auto;position:static}.resource-library>.session-reader,.help-explorer>.session-reader{min-height:60dvh;padding:24px 16px}}.sidebar nav{flex-shrink:0;margin-block:auto}.sidebar .project-activity{position:absolute;bottom:16px}@media (height<=720px){.sidebar{padding-block:16px}.sidebar nav{gap:8px}.sidebar .project-activity{display:none}}
|
|
Binary file
|
|
Binary file
|
package/dist/web/index.html
CHANGED
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
href="./assets/teammy-y-standard-dark-C4LRaRpE.svg"
|
|
13
13
|
media="(prefers-color-scheme: dark)"
|
|
14
14
|
/>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
-
<link rel="
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-D9m13C7l.js"></script>
|
|
16
|
+
<link rel="modulepreload" crossorigin href="./assets/Dropdown-BnYLBw2s.js">
|
|
17
|
+
<link rel="stylesheet" crossorigin href="./assets/index-qX1GRw9I.css">
|
|
17
18
|
</head>
|
|
18
19
|
<body>
|
|
19
20
|
<div id="root" data-teammy-ui-version="11"></div>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
commit-message:
|
|
6
|
+
# Prefix all commit messages with "chore: "
|
|
7
|
+
prefix: "chore"
|
|
8
|
+
schedule:
|
|
9
|
+
interval: "weekly"
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 7
|
|
12
|
+
allow:
|
|
13
|
+
- dependency-name: "*"
|
|
14
|
+
update-types:
|
|
15
|
+
- "version-update:semver-major"
|
|
16
|
+
open-pull-requests-limit: 10
|
|
17
|
+
|
|
18
|
+
- package-ecosystem: "npm"
|
|
19
|
+
directory: "/"
|
|
20
|
+
commit-message:
|
|
21
|
+
# Prefix all commit messages with "chore: "
|
|
22
|
+
prefix: "chore"
|
|
23
|
+
schedule:
|
|
24
|
+
interval: "weekly"
|
|
25
|
+
cooldown:
|
|
26
|
+
default-days: 7
|
|
27
|
+
versioning-strategy: "increase-if-necessary"
|
|
28
|
+
allow:
|
|
29
|
+
- dependency-name: "*"
|
|
30
|
+
update-types:
|
|
31
|
+
- "version-update:semver-major"
|
|
32
|
+
ignore:
|
|
33
|
+
# TODO: remove ignore until neostandard support ESLint 10
|
|
34
|
+
- dependency-name: "eslint"
|
|
35
|
+
- dependency-name: "neostandard"
|
|
36
|
+
- dependency-name: "@stylistic/*"
|
|
37
|
+
open-pull-requests-limit: 10
|
|
38
|
+
groups:
|
|
39
|
+
# Production dependencies with breaking changes
|
|
40
|
+
dependencies:
|
|
41
|
+
dependency-type: "production"
|
|
42
|
+
# ESLint related dependencies
|
|
43
|
+
dev-dependencies-eslint:
|
|
44
|
+
patterns:
|
|
45
|
+
- "eslint"
|
|
46
|
+
- "neostandard"
|
|
47
|
+
- "@stylistic/*"
|
|
48
|
+
# TypeScript related dependencies
|
|
49
|
+
dev-dependencies-typescript:
|
|
50
|
+
patterns:
|
|
51
|
+
- "@types/*"
|
|
52
|
+
- "tstyche"
|
|
53
|
+
- "typescript"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- next
|
|
8
|
+
- 'v*'
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- 'docs/**'
|
|
11
|
+
- '*.md'
|
|
12
|
+
pull_request:
|
|
13
|
+
paths-ignore:
|
|
14
|
+
- 'docs/**'
|
|
15
|
+
- '*.md'
|
|
16
|
+
|
|
17
|
+
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
18
|
+
concurrency:
|
|
19
|
+
group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
test:
|
|
27
|
+
permissions:
|
|
28
|
+
contents: write
|
|
29
|
+
pull-requests: write
|
|
30
|
+
uses: fastify/workflows/.github/workflows/plugins-ci.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
31
|
+
with:
|
|
32
|
+
license-check: true
|
|
33
|
+
lint: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Lock Threads
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 1 * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: lock
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lock-threads:
|
|
16
|
+
permissions:
|
|
17
|
+
issues: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
uses: fastify/workflows/.github/workflows/lock-threads.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release the package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
semver:
|
|
7
|
+
description: 'Release bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
permissions:
|
|
20
|
+
id-token: write # required for npm provenance via OIDC
|
|
21
|
+
contents: write # required to push the release commit and the tag
|
|
22
|
+
uses: fastify/workflows/.github/workflows/reusable-release.yml@731d0cca9a6a5b9586dad6b0326d49001ab9216f
|
|
23
|
+
with:
|
|
24
|
+
semver: ${{ inputs.semver }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
# @fastify/websocket
|
|
2
|
+
|
|
3
|
+
[](https://github.com/fastify/fastify-websocket/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@fastify/websocket)
|
|
5
|
+
[](https://github.com/neostandard/neostandard)
|
|
6
|
+
|
|
7
|
+
WebSocket support for [Fastify](https://github.com/fastify/fastify).
|
|
8
|
+
Built upon [ws@8](https://www.npmjs.com/package/ws).
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```shell
|
|
13
|
+
npm i @fastify/websocket
|
|
14
|
+
# or
|
|
15
|
+
yarn add @fastify/websocket
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If you're a TypeScript user, this package has its own TypeScript types built in, but you will also need to install the types for the `ws` package:
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
npm i @types/ws -D
|
|
22
|
+
# or
|
|
23
|
+
yarn add -D @types/ws
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If you use TypeScript and Yarn 2, you'll need to add a `packageExtension` to your `.yarnrc.yml` file:
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
packageExtensions:
|
|
30
|
+
"@fastify/websocket@*":
|
|
31
|
+
peerDependencies:
|
|
32
|
+
fastify: "*"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
After registering this plugin, you can choose on which routes the WS server will respond. This can be achieved by adding `websocket: true` property to `routeOptions` on a fastify's `.get` route. In this case, two arguments will be passed to the handler, the socket connection, and the `fastify` request object:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
'use strict'
|
|
41
|
+
|
|
42
|
+
const fastify = require('fastify')()
|
|
43
|
+
fastify.register(require('@fastify/websocket'))
|
|
44
|
+
fastify.register(async function (fastify) {
|
|
45
|
+
fastify.get('/', { websocket: true }, (socket /* WebSocket */, req /* FastifyRequest */) => {
|
|
46
|
+
socket.on('message', message => {
|
|
47
|
+
// message.toString() === 'hi from client'
|
|
48
|
+
socket.send('hi from server')
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
fastify.listen({ port: 3000 }, err => {
|
|
54
|
+
if (err) {
|
|
55
|
+
fastify.log.error(err)
|
|
56
|
+
process.exit(1)
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
In this case, it will respond with a 404 error on every unregistered route, closing the incoming upgrade connection requests.
|
|
62
|
+
|
|
63
|
+
However, you can still define a wildcard route, that will be used as the default handler:
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
'use strict'
|
|
67
|
+
|
|
68
|
+
const fastify = require('fastify')()
|
|
69
|
+
|
|
70
|
+
fastify.register(require('@fastify/websocket'), {
|
|
71
|
+
options: { maxPayload: 1048576 }
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
fastify.register(async function (fastify) {
|
|
75
|
+
fastify.get('/*', { websocket: true }, (socket /* WebSocket */, req /* FastifyRequest */) => {
|
|
76
|
+
socket.on('message', message => {
|
|
77
|
+
// message.toString() === 'hi from client'
|
|
78
|
+
socket.send('hi from wildcard route')
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
fastify.get('/', { websocket: true }, (socket /* WebSocket */, req /* FastifyRequest */) => {
|
|
83
|
+
socket.on('message', message => {
|
|
84
|
+
// message.toString() === 'hi from client'
|
|
85
|
+
socket.send('hi from server')
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
fastify.listen({ port: 3000 }, err => {
|
|
91
|
+
if (err) {
|
|
92
|
+
fastify.log.error(err)
|
|
93
|
+
process.exit(1)
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Attaching event handlers
|
|
99
|
+
Websocket route handlers must attach event handlers synchronously during handler execution to avoid accidentally dropping messages. If you want to do any async work in your websocket handler, say to authenticate a user or load data from a datastore, ensure you attach any `on('message')` handlers *before* you trigger this async work. Otherwise, messages might arrive whilst this async work is underway, and if there is no handler listening for this data it will be silently dropped.
|
|
100
|
+
|
|
101
|
+
Here is an example of how to attach message handlers synchronously while still accessing asynchronous resources. We store a promise for the async thing in a local variable, attach the message handler synchronously, and then make the message handler itself asynchronous to grab the async data and do some processing:
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
fastify.get('/*', { websocket: true }, (socket, request) => {
|
|
105
|
+
const sessionPromise = request.getSession() // example async session getter, called synchronously to return a promise
|
|
106
|
+
|
|
107
|
+
socket.on('message', async (message) => {
|
|
108
|
+
const session = await sessionPromise()
|
|
109
|
+
// do something with the message and session
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
### Using hooks
|
|
114
|
+
|
|
115
|
+
Routes registered with `@fastify/websocket` respect the Fastify plugin encapsulation contexts. Hooks that run **before** the websocket connection is established will be called - this includes `onRequest`, `preParsing`, `preValidation`, and `preHandler`. These hooks can be used for authentication or other request-level processing.
|
|
116
|
+
|
|
117
|
+
However, hooks related to response serialization and transmission (`preSerialization`, `onSend`) **do not run** for websocket routes. Once the connection is upgraded, message handling is outside Fastify's HTTP lifecycle. If you need to transform outgoing websocket messages, implement that logic in your handler before calling `socket.send()`.
|
|
118
|
+
|
|
119
|
+
```js
|
|
120
|
+
fastify.addHook('preValidation', async (request, reply) => {
|
|
121
|
+
// check if the request is authenticated
|
|
122
|
+
if (!request.isAuthenticated()) {
|
|
123
|
+
await reply.code(401).send("not authenticated");
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
fastify.get('/', { websocket: true }, (socket, req) => {
|
|
127
|
+
// the connection will only be opened for authenticated incoming requests
|
|
128
|
+
socket.on('message', message => {
|
|
129
|
+
// ...
|
|
130
|
+
})
|
|
131
|
+
})
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**NB**
|
|
135
|
+
This plugin uses the same router as the `fastify` instance, this has a few implications to take into account:
|
|
136
|
+
- Websocket route handlers follow the usual `fastify` request lifecycle, which means hooks, error handlers, and decorators all work the same way as other route handlers.
|
|
137
|
+
- You can access the fastify server via `this` in your handlers
|
|
138
|
+
- When using `@fastify/websocket`, it needs to be registered before all routes in order to be able to intercept websocket connections to existing routes and close the connection on non-websocket routes.
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
import Fastify from 'fastify'
|
|
142
|
+
import websocket from '@fastify/websocket'
|
|
143
|
+
|
|
144
|
+
const fastify = Fastify()
|
|
145
|
+
await fastify.register(websocket)
|
|
146
|
+
|
|
147
|
+
fastify.get('/', { websocket: true }, function wsHandler (socket, req) {
|
|
148
|
+
// bound to fastify server
|
|
149
|
+
this.myDecoration.someFunc()
|
|
150
|
+
|
|
151
|
+
socket.on('message', message => {
|
|
152
|
+
// message.toString() === 'hi from client'
|
|
153
|
+
socket.send('hi from server')
|
|
154
|
+
})
|
|
155
|
+
})
|
|
156
|
+
|
|
157
|
+
await fastify.listen({ port: 3000 })
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
If you need to handle both HTTP requests and incoming socket connections on the same route, you can still do it using the [full declaration syntax](https://fastify.dev/docs/latest/Reference/Routes/#full-declaration), adding a `wsHandler` property.
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
'use strict'
|
|
164
|
+
|
|
165
|
+
const fastify = require('fastify')()
|
|
166
|
+
|
|
167
|
+
function handle (socket, req) {
|
|
168
|
+
socket.on('message', (data) => socket.send(data)) // creates an echo server
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
fastify.register(require('@fastify/websocket'), {
|
|
172
|
+
handle,
|
|
173
|
+
options: { maxPayload: 1048576 }
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
fastify.register(async function () {
|
|
177
|
+
fastify.route({
|
|
178
|
+
method: 'GET',
|
|
179
|
+
url: '/hello',
|
|
180
|
+
handler: (req, reply) => {
|
|
181
|
+
// this will handle http requests
|
|
182
|
+
reply.send({ hello: 'world' })
|
|
183
|
+
},
|
|
184
|
+
wsHandler: (socket, req) => {
|
|
185
|
+
// this will handle websockets connections
|
|
186
|
+
socket.send('hello client')
|
|
187
|
+
|
|
188
|
+
socket.once('message', chunk => {
|
|
189
|
+
socket.close()
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
fastify.listen({ port: 3000 }, err => {
|
|
196
|
+
if (err) {
|
|
197
|
+
fastify.log.error(err)
|
|
198
|
+
process.exit(1)
|
|
199
|
+
}
|
|
200
|
+
})
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Custom error handler:
|
|
204
|
+
|
|
205
|
+
You can optionally provide a custom `errorHandler` that will be used to handle any cleaning up of established websocket connections. The `errorHandler` will be called if any errors are thrown by your websocket route handler after the connection has been established, as well as for `error` events emitted by the established websocket connection itself (for example when a client disconnects uncleanly), so applications can classify expected disconnect errors instead of having them logged unconditionally at the error level. Note that neither Fastify's `onError` hook or functions registered with `fastify.setErrorHandler` will be called for errors thrown during a websocket request handler.
|
|
206
|
+
|
|
207
|
+
Neither the `errorHandler` passed to this plugin or fastify's `onError` hook will be called for errors encountered during message processing for your connection. If you want to handle unexpected errors within your `message` event handlers, you'll need to use your own `try { } catch {}` statements and decide what to send back over the websocket.
|
|
208
|
+
|
|
209
|
+
```js
|
|
210
|
+
const fastify = require('fastify')()
|
|
211
|
+
|
|
212
|
+
fastify.register(require('@fastify/websocket'), {
|
|
213
|
+
errorHandler: function (error, socket /* WebSocket */, req /* FastifyRequest */, reply /* FastifyReply */) {
|
|
214
|
+
// Do stuff
|
|
215
|
+
// destroy/close connection
|
|
216
|
+
socket.terminate()
|
|
217
|
+
},
|
|
218
|
+
options: {
|
|
219
|
+
maxPayload: 1048576, // we set the maximum allowed messages size to 1 MiB (1024 bytes * 1024 bytes)
|
|
220
|
+
verifyClient: function (info, next) {
|
|
221
|
+
if (info.req.headers['x-fastify-header'] !== 'fastify is awesome !') {
|
|
222
|
+
return next(false) // the connection is not allowed
|
|
223
|
+
}
|
|
224
|
+
next(true) // the connection is allowed
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
fastify.get('/', { websocket: true }, (socket /* WebSocket */, req /* FastifyRequest */) => {
|
|
230
|
+
socket.on('message', message => {
|
|
231
|
+
// message.toString() === 'hi from client'
|
|
232
|
+
socket.send('hi from server')
|
|
233
|
+
})
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
fastify.listen({ port: 3000 }, err => {
|
|
237
|
+
if (err) {
|
|
238
|
+
fastify.log.error(err)
|
|
239
|
+
process.exit(1)
|
|
240
|
+
}
|
|
241
|
+
})
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Note: Fastify's `onError` and error handlers registered by `setErrorHandler` will still be called for errors encountered *before* the websocket connection is established. This means errors thrown by `onRequest` hooks, `preValidation` handlers, and hooks registered by plugins will use the normal error handling mechanisms in Fastify. Once the websocket is established and your websocket route handler is called, `fastify-websocket`'s `errorHandler` takes over.
|
|
245
|
+
|
|
246
|
+
### Custom preClose hook:
|
|
247
|
+
|
|
248
|
+
By default, all ws connections are closed when the server closes. If you wish to modify this behavior, you can pass your own `preClose` function.
|
|
249
|
+
|
|
250
|
+
Note that `preClose` is responsible for closing all connections and closing the websocket server.
|
|
251
|
+
|
|
252
|
+
```js
|
|
253
|
+
const fastify = require('fastify')()
|
|
254
|
+
|
|
255
|
+
fastify.register(require('@fastify/websocket'), {
|
|
256
|
+
preClose: (done) => { // Note: can also use async style, without done-callback
|
|
257
|
+
const server = this.websocketServer
|
|
258
|
+
|
|
259
|
+
for (const socket of server.clients) {
|
|
260
|
+
socket.close(1001, 'WS server is going offline in custom manner, sending a code + message')
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
server.close(done)
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Creating a stream from the WebSocket
|
|
269
|
+
|
|
270
|
+
```js
|
|
271
|
+
const Fastify = require('fastify')
|
|
272
|
+
const FastifyWebSocket = require('@fastify/websocket')
|
|
273
|
+
const ws = require('ws')
|
|
274
|
+
|
|
275
|
+
const fastify = Fastify()
|
|
276
|
+
await fastify.register(FastifyWebSocket)
|
|
277
|
+
|
|
278
|
+
fastify.get('/', { websocket: true }, (socket, req) => {
|
|
279
|
+
const stream = ws.createWebSocketStream(socket, { /* options */ })
|
|
280
|
+
stream.setEncoding('utf8')
|
|
281
|
+
stream.write('hello client')
|
|
282
|
+
|
|
283
|
+
stream.on('data', function (data) {
|
|
284
|
+
// Make sure to set up a data handler or read all the incoming
|
|
285
|
+
// data in another way, otherwise stream backpressure will cause
|
|
286
|
+
// the underlying WebSocket object to get paused.
|
|
287
|
+
})
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
await fastify.listen({ port: 3000 })
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Testing
|
|
294
|
+
|
|
295
|
+
Testing the ws handler can be quite tricky, luckily `fastify-websocket` decorates fastify instance with `injectWS`,
|
|
296
|
+
which allows easy testing of a websocket endpoint.
|
|
297
|
+
|
|
298
|
+
The signature of injectWS is the following: `([path], [upgradeContext])`.
|
|
299
|
+
|
|
300
|
+
#### App.js
|
|
301
|
+
|
|
302
|
+
```js
|
|
303
|
+
'use strict'
|
|
304
|
+
|
|
305
|
+
const Fastify = require('fastify')
|
|
306
|
+
const FastifyWebSocket = require('@fastify/websocket')
|
|
307
|
+
|
|
308
|
+
const App = Fastify()
|
|
309
|
+
|
|
310
|
+
App.register(FastifyWebSocket);
|
|
311
|
+
|
|
312
|
+
App.register(async function(fastify) {
|
|
313
|
+
fastify.addHook('preValidation', async (request, reply) => {
|
|
314
|
+
if (request.headers['api-key'] !== 'some-random-key') {
|
|
315
|
+
return reply.code(401).send()
|
|
316
|
+
}
|
|
317
|
+
})
|
|
318
|
+
|
|
319
|
+
fastify.get('/', { websocket: true }, (socket) => {
|
|
320
|
+
socket.on('message', message => {
|
|
321
|
+
socket.send('hi from server')
|
|
322
|
+
})
|
|
323
|
+
})
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
module.exports = App
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
#### App.test.js
|
|
330
|
+
|
|
331
|
+
```js
|
|
332
|
+
'use strict'
|
|
333
|
+
|
|
334
|
+
const { test } = require('node:test')
|
|
335
|
+
const fastify = require('./app.js')
|
|
336
|
+
|
|
337
|
+
test('connect to /', async (t) => {
|
|
338
|
+
t.plan(1)
|
|
339
|
+
|
|
340
|
+
t.after(() => fastify.close())
|
|
341
|
+
await fastify.ready()
|
|
342
|
+
|
|
343
|
+
const ws = await fastify.injectWS('/', {headers: { "api-key" : "some-random-key" }})
|
|
344
|
+
|
|
345
|
+
let resolve;
|
|
346
|
+
const promise = new Promise(r => { resolve = r })
|
|
347
|
+
|
|
348
|
+
ws.on('message', (data) => {
|
|
349
|
+
resolve(data.toString());
|
|
350
|
+
})
|
|
351
|
+
ws.send('hi from client')
|
|
352
|
+
|
|
353
|
+
t.assert.deepStrictEqual(await promise, 'hi from server')
|
|
354
|
+
// Remember to close the ws at the end
|
|
355
|
+
ws.terminate()
|
|
356
|
+
})
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
#### Things to know
|
|
360
|
+
- Websocket needs to be closed manually at the end of each test.
|
|
361
|
+
- `fastify.ready()` needs to be awaited to ensure that fastify has been decorated.
|
|
362
|
+
- You need to register the event listener before sending the message if you need to process the server response.
|
|
363
|
+
|
|
364
|
+
## Options
|
|
365
|
+
|
|
366
|
+
`@fastify/websocket` accept these options for [`ws`](https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketserveroptions-callback) :
|
|
367
|
+
|
|
368
|
+
- `host` - The hostname where to bind the server.
|
|
369
|
+
- `port` - The port where to bind the server.
|
|
370
|
+
- `backlog` - The maximum length of the queue of pending connections.
|
|
371
|
+
- `server` - A pre-created Node.js HTTP/S server.
|
|
372
|
+
- `verifyClient` - A function that can be used to validate incoming connections.
|
|
373
|
+
- `handleProtocols` - A function that can be used to handle the WebSocket subprotocols.
|
|
374
|
+
- `clientTracking` - Specifies whether or not to track clients.
|
|
375
|
+
- `perMessageDeflate` - Enable/disable permessage-deflate.
|
|
376
|
+
- `maxPayload` - The maximum allowed message size in bytes.
|
|
377
|
+
|
|
378
|
+
For more information, you can check [`ws` options documentation](https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketserveroptions-callback).
|
|
379
|
+
|
|
380
|
+
_**NB** By default if you do not provide a `server` option `@fastify/websocket` will bind your websocket server instance to the scoped `fastify` instance._
|
|
381
|
+
|
|
382
|
+
_**NB** The `path` option from `ws` should not be provided since the routing is handled by fastify itself_
|
|
383
|
+
|
|
384
|
+
_**NB** The `noServer` option from `ws` should not be provided since the point of @fastify/websocket is to listen on the fastify server. If you want a custom server, you can use the `server` option, and if you want more control, you can use the `ws` library directly_
|
|
385
|
+
|
|
386
|
+
[ws](https://github.com/websockets/ws) does not allow you to set `objectMode` or `writableObjectMode` to true
|
|
387
|
+
## Acknowledgments
|
|
388
|
+
|
|
389
|
+
This project is kindly sponsored by [nearForm](https://nearform.com).
|
|
390
|
+
|
|
391
|
+
## License
|
|
392
|
+
|
|
393
|
+
Licensed under [MIT](./LICENSE).
|