mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-31 03:07:23 +00:00
fix(protocol): refactor oauth-authorize to accept an ImageLike when authorizing
This commit moves the image.ts file from the frontend into the protocol package, allowing the argument type to be updated.
This commit is contained in:
parent
fa3fbe3044
commit
c7937e040a
9 changed files with 9 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
|||
import { z } from 'zod/v4';
|
||||
import { ImageLikeSchema } from './image';
|
||||
|
||||
export const OpenPayloadSchema = z.object({
|
||||
target: z.string(),
|
||||
|
@ -93,7 +94,7 @@ export const ClipboardClearMessageSchema = z.object({
|
|||
export const OauthAuthorizePayloadSchema = z.object({
|
||||
url: z.string(),
|
||||
providerName: z.string(),
|
||||
providerIcon: z.string().optional(),
|
||||
providerIcon: ImageLikeSchema.optional(),
|
||||
description: z.string().optional()
|
||||
});
|
||||
export const OauthAuthorizeMessageSchema = z.object({
|
||||
|
|
|
@ -7,3 +7,4 @@ export * from './main';
|
|||
export * from './plugin';
|
||||
export * from './preferences';
|
||||
export * from './toast';
|
||||
export * from './image';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from 'zod/v4';
|
||||
import { ImageLikeSchema } from './image';
|
||||
import { ImageLikeSchema } from '@raycast-linux/protocol';
|
||||
|
||||
const KeyModifierSchema = z.enum(['cmd', 'ctrl', 'opt', 'shift']);
|
||||
const KeyEquivalentSchema = z.string();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from 'zod/v4';
|
||||
import { ImageLikeSchema } from './image';
|
||||
import { ImageLikeSchema } from '@raycast-linux/protocol';
|
||||
import { ColorLikeSchema } from './color';
|
||||
import { TextWithColorSchema } from './text';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from 'zod/v4';
|
||||
import { ImageLikeSchema } from './image';
|
||||
import { ImageLikeSchema } from '@raycast-linux/protocol';
|
||||
|
||||
export const DropdownItemPropsSchema = z.object({
|
||||
value: z.string(),
|
||||
|
|
|
@ -44,7 +44,7 @@ export * from './detail';
|
|||
export * from './grid';
|
||||
export * from './list';
|
||||
export * from './form';
|
||||
export * from './image';
|
||||
export * from '@raycast-linux/protocol';
|
||||
export * from './color';
|
||||
export * from './dropdown';
|
||||
export * from './section';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { z } from 'zod/v4';
|
||||
import { ImageLikeSchema } from './image';
|
||||
import { ImageLikeSchema } from '@raycast-linux/protocol';
|
||||
import { ColorLikeSchema } from './color';
|
||||
import { DetailMetadataPropsSchema } from './detail';
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ class SidecarService {
|
|||
|
||||
if (!result.success) {
|
||||
this.#log(`ERROR: Received invalid message from sidecar: ${result.error.message}`);
|
||||
console.error('Invalid sidecar message:', result.error);
|
||||
console.error('Invalid sidecar message:', message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue