Skip to content

Commit 18af63b

Browse files
committed
fix: silence lint/build warnings
1 parent 96ac756 commit 18af63b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

packages/clawdhub/src/cli/commands/publish.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ describe('cmdPublish', () => {
8080
})
8181
if (!publishCall) throw new Error('Missing publish call')
8282
const publishForm = (publishCall[1] as { form?: FormData }).form as FormData
83-
const payload = JSON.parse(String(publishForm.get('payload')))
83+
const payloadRaw = publishForm.get('payload')
84+
expect(typeof payloadRaw).toBe('string')
85+
const payload = JSON.parse(payloadRaw as string)
8486
expect(payload.slug).toBe('my-skill')
8587
expect(payload.displayName).toBe('My Skill')
8688
expect(payload.version).toBe('1.0.0')
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export function formatPublishError(error: unknown) {
5353
}
5454
if (error instanceof Error) {
5555
const cleaned = error.message
56-
.replace(/\[CONVEX[^\]]*\]\s*/g, '')
57-
.replace(/\[Request ID:[^\]]*\]\s*/g, '')
58-
.replace(/^Server Error Called by client\s*/i, '')
59-
.replace(/^ConvexError:\s*/i, '')
56+
.replace(/\\[CONVEX[^\\]]*\\]\\s*/g, '')
57+
.replace(/\\[Request ID:[^\\]]*\\]\\s*/g, '')
58+
.replace(/^Server Error Called by client\\s*/i, '')
59+
.replace(/^ConvexError:\\s*/i, '')
6060
.trim()
6161
if (cleaned && cleaned !== 'Server Error') return cleaned
6262
}

src/routes/upload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
isTextFile,
1212
readText,
1313
uploadFile,
14-
} from './upload/utils'
14+
} from '../lib/uploadUtils'
1515

1616
const SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/
1717

0 commit comments

Comments
 (0)