fix: scripts support win32 (#12613)

Co-authored-by: Innei <tukon479@gmail.com>
This commit is contained in:
huangkairan
2026-03-03 19:19:56 +08:00
committed by GitHub
parent 138788b1d4
commit 1cf0257326
10 changed files with 40 additions and 12 deletions

View File

@@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"type-check": "tsc --noEmit"
},
"dependencies": {

View File

@@ -1,6 +1,6 @@
import { DurableObject } from 'cloudflare:workers';
import { DeviceAttachment, Env } from './types';
import type { DeviceAttachment, Env } from './types';
export class DeviceGatewayDO extends DurableObject<Env> {
private pendingRequests = new Map<
@@ -95,7 +95,11 @@ export class DeviceGatewayDO extends DurableObject<Env> {
);
}
const { deviceId, timeout = 30_000, toolCall } = (await request.json()) as {
const {
deviceId,
timeout = 30_000,
toolCall,
} = (await request.json()) as {
deviceId?: string;
timeout?: number;
toolCall: unknown;

View File

@@ -1,6 +1,6 @@
import { importJWK, jwtVerify } from 'jose';
import { Env } from './types';
import type { Env } from './types';
let cachedKey: CryptoKey | null = null;

View File

@@ -1,6 +1,6 @@
import { verifyDesktopToken } from './auth';
import { DeviceGatewayDO } from './DeviceGatewayDO';
import { Env } from './types';
import type { Env } from './types';
export { DeviceGatewayDO };