dsh-spec-collab 0.1.4 → 0.1.5
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/lib/client.js +87 -87
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/routes.ts +1 -1
package/lib/client.js
CHANGED
|
@@ -39165,113 +39165,113 @@ window.__ModuleLoader__.load({
|
|
|
39165
39165
|
document.head.appendChild(tag);
|
|
39166
39166
|
}
|
|
39167
39167
|
var workbench_module_css_default = {
|
|
39168
|
-
"
|
|
39169
|
-
"
|
|
39168
|
+
"entryActive": "-kTeaG_entryActive",
|
|
39169
|
+
"execute": "-kTeaG_execute",
|
|
39170
|
+
"tabbar": "-kTeaG_tabbar",
|
|
39171
|
+
"quickOptions": "-kTeaG_quickOptions",
|
|
39172
|
+
"selectionPrompt": "-kTeaG_selectionPrompt",
|
|
39173
|
+
"selectedDoc": "-kTeaG_selectedDoc",
|
|
39170
39174
|
"collapseChat": "-kTeaG_collapseChat",
|
|
39171
|
-
"
|
|
39172
|
-
"
|
|
39175
|
+
"noticeHidden": "-kTeaG_noticeHidden",
|
|
39176
|
+
"footer": "-kTeaG_footer",
|
|
39173
39177
|
"reply": "-kTeaG_reply",
|
|
39174
|
-
"
|
|
39178
|
+
"saveButton": "-kTeaG_saveButton",
|
|
39179
|
+
"chatError": "-kTeaG_chatError",
|
|
39180
|
+
"versionCompare": "-kTeaG_versionCompare",
|
|
39181
|
+
"conflictModal": "-kTeaG_conflictModal",
|
|
39182
|
+
"paneHead": "-kTeaG_paneHead",
|
|
39183
|
+
"rowMenuButton": "-kTeaG_rowMenuButton",
|
|
39184
|
+
"conflictActions": "-kTeaG_conflictActions",
|
|
39185
|
+
"mobileSpec": "-kTeaG_mobileSpec",
|
|
39186
|
+
"tabBadge": "-kTeaG_tabBadge",
|
|
39175
39187
|
"toolbar": "-kTeaG_toolbar",
|
|
39188
|
+
"mobileViewSwitch": "-kTeaG_mobileViewSwitch",
|
|
39189
|
+
"markdownBody": "-kTeaG_markdownBody",
|
|
39190
|
+
"dangerText": "-kTeaG_dangerText",
|
|
39191
|
+
"documentButton": "-kTeaG_documentButton",
|
|
39192
|
+
"entry": "-kTeaG_entry",
|
|
39193
|
+
"paneClosed": "-kTeaG_paneClosed",
|
|
39194
|
+
"review": "-kTeaG_review",
|
|
39195
|
+
"reviewTitle": "-kTeaG_reviewTitle",
|
|
39196
|
+
"patchPreview": "-kTeaG_patchPreview",
|
|
39197
|
+
"titleBlock": "-kTeaG_titleBlock",
|
|
39198
|
+
"pendingReview": "-kTeaG_pendingReview",
|
|
39199
|
+
"conflictHeader": "-kTeaG_conflictHeader",
|
|
39200
|
+
"newThread": "-kTeaG_newThread",
|
|
39176
39201
|
"modal": "-kTeaG_modal",
|
|
39177
|
-
"
|
|
39178
|
-
"legacyWarning": "-kTeaG_legacyWarning",
|
|
39179
|
-
"notice": "-kTeaG_notice",
|
|
39180
|
-
"commentAction": "-kTeaG_commentAction",
|
|
39202
|
+
"evidence": "-kTeaG_evidence",
|
|
39181
39203
|
"richEditor": "-kTeaG_richEditor",
|
|
39182
|
-
"
|
|
39204
|
+
"aiMessage": "-kTeaG_aiMessage",
|
|
39205
|
+
"iconButton": "-kTeaG_iconButton",
|
|
39206
|
+
"checkBlocked": "-kTeaG_checkBlocked",
|
|
39207
|
+
"itemsPanel": "-kTeaG_itemsPanel",
|
|
39208
|
+
"aiConversation": "-kTeaG_aiConversation",
|
|
39209
|
+
"emptyMain": "-kTeaG_emptyMain",
|
|
39210
|
+
"empty": "-kTeaG_empty",
|
|
39211
|
+
"reviewCard": "-kTeaG_reviewCard",
|
|
39212
|
+
"editorTitle": "-kTeaG_editorTitle",
|
|
39183
39213
|
"editorPane": "-kTeaG_editorPane",
|
|
39184
|
-
"
|
|
39185
|
-
"
|
|
39186
|
-
"
|
|
39214
|
+
"headerActions": "-kTeaG_headerActions",
|
|
39215
|
+
"reviewField": "-kTeaG_reviewField",
|
|
39216
|
+
"summaryInput": "-kTeaG_summaryInput",
|
|
39217
|
+
"chatMessages": "-kTeaG_chatMessages",
|
|
39218
|
+
"grid": "-kTeaG_grid",
|
|
39219
|
+
"mobileCollab": "-kTeaG_mobileCollab",
|
|
39220
|
+
"unsaved": "-kTeaG_unsaved",
|
|
39221
|
+
"conflictDialog": "-kTeaG_conflictDialog",
|
|
39222
|
+
"badges": "-kTeaG_badges",
|
|
39223
|
+
"questionField": "-kTeaG_questionField",
|
|
39224
|
+
"chatToggle": "-kTeaG_chatToggle",
|
|
39187
39225
|
"conflictColumns": "-kTeaG_conflictColumns",
|
|
39226
|
+
"identity": "-kTeaG_identity",
|
|
39227
|
+
"requirementRow": "-kTeaG_requirementRow",
|
|
39228
|
+
"header": "-kTeaG_header",
|
|
39229
|
+
"resizer": "-kTeaG_resizer",
|
|
39230
|
+
"documents": "-kTeaG_documents",
|
|
39231
|
+
"checklist": "-kTeaG_checklist",
|
|
39188
39232
|
"conflictDiffs": "-kTeaG_conflictDiffs",
|
|
39189
|
-
"
|
|
39190
|
-
"entry": "-kTeaG_entry",
|
|
39191
|
-
"execute": "-kTeaG_execute",
|
|
39192
|
-
"preview": "-kTeaG_preview",
|
|
39193
|
-
"endedReview": "-kTeaG_endedReview",
|
|
39233
|
+
"notice": "-kTeaG_notice",
|
|
39194
39234
|
"paneActions": "-kTeaG_paneActions",
|
|
39195
|
-
"
|
|
39196
|
-
"checkIcon": "-kTeaG_checkIcon",
|
|
39197
|
-
"entryActive": "-kTeaG_entryActive",
|
|
39198
|
-
"newThread": "-kTeaG_newThread",
|
|
39199
|
-
"paneHead": "-kTeaG_paneHead",
|
|
39200
|
-
"downstreamReturn": "-kTeaG_downstreamReturn",
|
|
39201
|
-
"itemsPanel": "-kTeaG_itemsPanel",
|
|
39202
|
-
"badges": "-kTeaG_badges",
|
|
39203
|
-
"selectionPrompt": "-kTeaG_selectionPrompt",
|
|
39235
|
+
"patchDetails": "-kTeaG_patchDetails",
|
|
39204
39236
|
"panelAction": "-kTeaG_panelAction",
|
|
39205
|
-
"
|
|
39206
|
-
"headerActions": "-kTeaG_headerActions",
|
|
39207
|
-
"decisionForm": "-kTeaG_decisionForm",
|
|
39237
|
+
"compareHead": "-kTeaG_compareHead",
|
|
39208
39238
|
"chatComposer": "-kTeaG_chatComposer",
|
|
39209
|
-
"
|
|
39210
|
-
"
|
|
39211
|
-
"
|
|
39212
|
-
"
|
|
39213
|
-
"
|
|
39214
|
-
"
|
|
39239
|
+
"commentAction": "-kTeaG_commentAction",
|
|
39240
|
+
"checkIcon": "-kTeaG_checkIcon",
|
|
39241
|
+
"humanResponse": "-kTeaG_humanResponse",
|
|
39242
|
+
"collapseRight": "-kTeaG_collapseRight",
|
|
39243
|
+
"preview": "-kTeaG_preview",
|
|
39244
|
+
"workbench": "-kTeaG_workbench",
|
|
39245
|
+
"patchAccept": "-kTeaG_patchAccept",
|
|
39246
|
+
"dangerButton": "-kTeaG_dangerButton",
|
|
39247
|
+
"panelSummary": "-kTeaG_panelSummary",
|
|
39248
|
+
"missingOptions": "-kTeaG_missingOptions",
|
|
39249
|
+
"editorContext": "-kTeaG_editorContext",
|
|
39215
39250
|
"userMessage": "-kTeaG_userMessage",
|
|
39216
|
-
"
|
|
39217
|
-
"
|
|
39218
|
-
"
|
|
39219
|
-
"
|
|
39220
|
-
"requirementRow": "-kTeaG_requirementRow",
|
|
39251
|
+
"legacyWarning": "-kTeaG_legacyWarning",
|
|
39252
|
+
"decisionForm": "-kTeaG_decisionForm",
|
|
39253
|
+
"checkItem": "-kTeaG_checkItem",
|
|
39254
|
+
"checkPassed": "-kTeaG_checkPassed",
|
|
39221
39255
|
"reviewCardBody": "-kTeaG_reviewCardBody",
|
|
39222
|
-
"
|
|
39223
|
-
"
|
|
39224
|
-
"
|
|
39256
|
+
"run": "-kTeaG_run",
|
|
39257
|
+
"endedReview": "-kTeaG_endedReview",
|
|
39258
|
+
"downstreamReturn": "-kTeaG_downstreamReturn",
|
|
39225
39259
|
"requirementMenu": "-kTeaG_requirementMenu",
|
|
39226
|
-
"emptyMain": "-kTeaG_emptyMain",
|
|
39227
|
-
"reviewCard": "-kTeaG_reviewCard",
|
|
39228
|
-
"header": "-kTeaG_header",
|
|
39229
|
-
"pendingReview": "-kTeaG_pendingReview",
|
|
39230
|
-
"rowMenuButton": "-kTeaG_rowMenuButton",
|
|
39231
39260
|
"threadList": "-kTeaG_threadList",
|
|
39261
|
+
"view": "-kTeaG_view",
|
|
39232
39262
|
"editorMeta": "-kTeaG_editorMeta",
|
|
39263
|
+
"itemRow": "-kTeaG_itemRow",
|
|
39233
39264
|
"reviewDetails": "-kTeaG_reviewDetails",
|
|
39234
|
-
"
|
|
39235
|
-
"editorContext": "-kTeaG_editorContext",
|
|
39236
|
-
"tabBadge": "-kTeaG_tabBadge",
|
|
39265
|
+
"cardActions": "-kTeaG_cardActions",
|
|
39237
39266
|
"runHistory": "-kTeaG_runHistory",
|
|
39238
|
-
"summaryInput": "-kTeaG_summaryInput",
|
|
39239
|
-
"dangerButton": "-kTeaG_dangerButton",
|
|
39240
|
-
"resizer": "-kTeaG_resizer",
|
|
39241
|
-
"quickOptions": "-kTeaG_quickOptions",
|
|
39242
|
-
"markdownBody": "-kTeaG_markdownBody",
|
|
39243
|
-
"saveButton": "-kTeaG_saveButton",
|
|
39244
|
-
"tabScroller": "-kTeaG_tabScroller",
|
|
39245
|
-
"collapseRight": "-kTeaG_collapseRight",
|
|
39246
|
-
"evidence": "-kTeaG_evidence",
|
|
39247
|
-
"humanResponse": "-kTeaG_humanResponse",
|
|
39248
|
-
"missingOptions": "-kTeaG_missingOptions",
|
|
39249
|
-
"patchPreview": "-kTeaG_patchPreview",
|
|
39250
|
-
"empty": "-kTeaG_empty",
|
|
39251
|
-
"reviewField": "-kTeaG_reviewField",
|
|
39252
|
-
"grid": "-kTeaG_grid",
|
|
39253
|
-
"chatToggle": "-kTeaG_chatToggle",
|
|
39254
|
-
"chatMessages": "-kTeaG_chatMessages",
|
|
39255
|
-
"aiMessage": "-kTeaG_aiMessage",
|
|
39256
|
-
"readyHead": "-kTeaG_readyHead",
|
|
39257
|
-
"checkItem": "-kTeaG_checkItem",
|
|
39258
|
-
"checkBlocked": "-kTeaG_checkBlocked",
|
|
39259
|
-
"tabbar": "-kTeaG_tabbar",
|
|
39260
|
-
"patchAccept": "-kTeaG_patchAccept",
|
|
39261
|
-
"checklist": "-kTeaG_checklist",
|
|
39262
|
-
"view": "-kTeaG_view",
|
|
39263
|
-
"iconButton": "-kTeaG_iconButton",
|
|
39264
39267
|
"resizerHidden": "-kTeaG_resizerHidden",
|
|
39265
|
-
"
|
|
39266
|
-
"
|
|
39268
|
+
"activeMode": "-kTeaG_activeMode",
|
|
39269
|
+
"editorBody": "-kTeaG_editorBody",
|
|
39270
|
+
"responseForm": "-kTeaG_responseForm",
|
|
39271
|
+
"readyHead": "-kTeaG_readyHead",
|
|
39267
39272
|
"versionRow": "-kTeaG_versionRow",
|
|
39268
|
-
"
|
|
39269
|
-
"
|
|
39270
|
-
"checkPassed": "-kTeaG_checkPassed",
|
|
39271
|
-
"chatError": "-kTeaG_chatError",
|
|
39272
|
-
"titleBlock": "-kTeaG_titleBlock",
|
|
39273
|
-
"conflictActions": "-kTeaG_conflictActions",
|
|
39274
|
-
"activeMode": "-kTeaG_activeMode"
|
|
39273
|
+
"tabScroller": "-kTeaG_tabScroller",
|
|
39274
|
+
"compareColumns": "-kTeaG_compareColumns"
|
|
39275
39275
|
};
|
|
39276
39276
|
//#endregion
|
|
39277
39277
|
//#region src/client/SpecWorkbench.tsx
|
package/lib/index.js
CHANGED
|
@@ -1291,7 +1291,7 @@ function trusted(req) {
|
|
|
1291
1291
|
if (!(remote === "127.0.0.1" || remote === "::1" || remote === "::ffff:127.0.0.1")) return false;
|
|
1292
1292
|
if (req.headers["sec-fetch-site"] === "cross-site") return false;
|
|
1293
1293
|
const origin = req.headers.origin;
|
|
1294
|
-
if (origin === void 0) return
|
|
1294
|
+
if (origin === void 0) return true;
|
|
1295
1295
|
try {
|
|
1296
1296
|
return new URL(origin).host === req.headers.host;
|
|
1297
1297
|
} catch {
|
package/package.json
CHANGED
package/src/routes.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { DshReviewCoordinator } from './review-runtime.ts'
|
|
|
7
7
|
const BODY_LIMIT = 2 * 1024 * 1024
|
|
8
8
|
const HEARTBEAT_MS = 15_000
|
|
9
9
|
function json(res: ServerResponse, status: number, body: unknown): void { res.writeHead(status, { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store', 'referrer-policy': 'no-referrer' }); res.end(JSON.stringify(body)) }
|
|
10
|
-
function trusted(req: IncomingMessage): boolean { const remote = req.socket.remoteAddress; if (!(remote === '127.0.0.1' || remote === '::1' || remote === '::ffff:127.0.0.1')) return false; if (req.headers['sec-fetch-site'] === 'cross-site') return false; const origin = req.headers.origin; if (origin === undefined) return
|
|
10
|
+
function trusted(req: IncomingMessage): boolean { const remote = req.socket.remoteAddress; if (!(remote === '127.0.0.1' || remote === '::1' || remote === '::ffff:127.0.0.1')) return false; if (req.headers['sec-fetch-site'] === 'cross-site') return false; const origin = req.headers.origin; if (origin === undefined) return true; try { return new URL(origin).host === req.headers.host } catch { return false } }
|
|
11
11
|
async function readJson(req: IncomingMessage): Promise<unknown> { const chunks: Buffer[] = []; let size = 0; for await (const chunk of req) { const buffer = chunk as Buffer; size += buffer.length; if (size > BODY_LIMIT) throw new Error('body-too-large'); chunks.push(buffer) } return JSON.parse(Buffer.concat(chunks).toString('utf8')) }
|
|
12
12
|
|
|
13
13
|
export function makeRoutes(engine: CollaborationEngine, coordinator: DshReviewCoordinator): WebRoute[] {
|