File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
packages/clawdhub/src/cli/commands Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff 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' )
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ export function formatPublishError(error: unknown) {
5353 }
5454 if ( error instanceof Error ) {
5555 const cleaned = error . message
56- . replace ( / \[ C O N V E X [ ^ \] ] * \] \s * / g, '' )
57- . replace ( / \[ R e q u e s t I D : [ ^ \] ] * \] \s * / g, '' )
58- . replace ( / ^ S e r v e r E r r o r C a l l e d b y c l i e n t \s * / i, '' )
59- . replace ( / ^ C o n v e x E r r o r : \s * / i, '' )
56+ . replace ( / \\ [ C O N V E X [ ^ \\ ] ] * \\ ] \ \s * / g, '' )
57+ . replace ( / \\ [ R e q u e s t I D : [ ^ \\ ] ] * \\ ] \ \s * / g, '' )
58+ . replace ( / ^ S e r v e r E r r o r C a l l e d b y c l i e n t \\ s * / i, '' )
59+ . replace ( / ^ C o n v e x E r r o r : \\ s * / i, '' )
6060 . trim ( )
6161 if ( cleaned && cleaned !== 'Server Error' ) return cleaned
6262 }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 isTextFile ,
1212 readText ,
1313 uploadFile ,
14- } from './upload/utils '
14+ } from '../lib/uploadUtils '
1515
1616const SLUG_PATTERN = / ^ [ a - z 0 - 9 ] + (?: - [ a - z 0 - 9 ] + ) * $ /
1717
You can’t perform that action at this time.
0 commit comments