chore: clean whitespace issues

This commit is contained in:
ant-black
2026-06-23 19:57:14 +08:00
parent 0a5d387ff9
commit 9b8158e573
29 changed files with 166 additions and 204 deletions
@@ -1,4 +1,4 @@
package launchcode
package launchcode
import (
"bytes"
@@ -483,4 +483,3 @@ func decodeJSONObjectBody(body []byte, fieldName string) (map[string]interface{}
}
return obj, true, nil
}
@@ -1,4 +1,4 @@
import { exportAutomationScript, type AutomationScriptRecord } from "./automationScripts";
import { exportAutomationScript, type AutomationScriptRecord } from "./automationScripts";
import { getBindings, type AutomationScriptExportResult } from "./automationScriptApi.shared";
function normalizeAutomationScriptExportResult(
@@ -165,4 +165,3 @@ export async function exportAutomationScriptDirectory(
throw new Error("当前环境不支持目录脚本包导出");
}
@@ -1,4 +1,4 @@
import { importAutomationScript, type AutomationScriptRecord } from "./automationScripts";
import { importAutomationScript, type AutomationScriptRecord } from "./automationScripts";
import { getBindings, normalizeAutomationScriptRecord, type AutomationScriptBatchImportResult } from "./automationScriptApi.shared";
export async function importAutomationScriptFromLocalFile(): Promise<AutomationScriptRecord> {
@@ -187,4 +187,3 @@ export async function refreshAutomationScript(
throw new Error("当前环境不支持按来源重新导入");
}
@@ -1,4 +1,4 @@
import { loadAutomationScripts, saveAutomationScripts, type AutomationScriptRecord } from "./automationScripts";
import { loadAutomationScripts, saveAutomationScripts, type AutomationScriptRecord } from "./automationScripts";
import { getBindings, normalizeAutomationScriptRecord, sortScripts } from "./automationScriptApi.shared";
export async function fetchAutomationScripts(): Promise<
@@ -65,4 +65,3 @@ export async function deleteAutomationScript(scriptId: string): Promise<void> {
loadAutomationScripts().filter((item) => item.id !== scriptId),
);
}
@@ -1,4 +1,4 @@
import {
import {
normalizeAutomationScriptPublicAPIConfig,
normalizeAutomationScriptRecordPayload,
normalizeAutomationScriptTargetConfig,
@@ -171,5 +171,3 @@ export function normalizeAutomationScriptRunInput(
startByCodeBeforeRun: input?.startByCodeBeforeRun === true,
};
}
@@ -1,4 +1,4 @@
import {
import {
AUTOMATION_SCRIPT_MANIFEST_VERSION,
AUTOMATION_SCRIPT_PACKAGE_FORMAT,
DUAL_INSTANCE_RUNTIME_SCRIPT_ID,
@@ -178,4 +178,3 @@ export function buildDefaultAutomationScripts(): AutomationScriptRecord[] {
createWebImageGenerateDownloadScriptDraft(),
];
}
@@ -1,4 +1,4 @@
import type { AutomationScriptType } from './definitions'
import type { AutomationScriptType } from './definitions'
import { normalizeAutomationScriptTargetSelector } from './targets'
const DUAL_INSTANCE_DEFAULT_CODES = ["BUYER_001", "BUYER_002"] as const;
@@ -395,5 +395,3 @@ export function normalizeDualInstanceRuntimeParamsText(text: string): string {
return fallback;
}
}
@@ -1,4 +1,4 @@
import { Copy } from "lucide-react";
import { Copy } from "lucide-react";
import { Button, Textarea } from "../../../shared/components";
import { copyText } from "./AutomationScriptPublicApiModal.helpers";
import type { AutomationScriptPublicAPIConfig } from "../automationScripts";
@@ -126,4 +126,3 @@ export function AutomationScriptPublicApiBodyExamples({
</div>
);
}
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState } from "react";
import { toast } from "../../../shared/components";
import {
invokeAutomationScriptPublicApi,
@@ -370,4 +370,3 @@ export function AutomationScriptPublicApiModal({
/>
);
}
@@ -1,4 +1,4 @@
import type { RefObject } from "react";
import type { RefObject } from "react";
import { Copy, FolderOpen, Play, Plus, Sparkles, Trash2 } from "lucide-react";
import { Button, FormItem, Input, Modal, Select, Switch } from "../../../shared/components";
import { AutomationInstanceSelector } from "./AutomationInstanceSelector";
@@ -470,5 +470,3 @@ export function AutomationScriptPublicApiModalView({
</Modal>
);
}
@@ -467,4 +467,3 @@ export function buildTemplateProfileOptions(profiles: BrowserProfile[]) {
.join(" · "),
}));
}
@@ -31,4 +31,3 @@ export const DEFAULT_DEMO_CREATE_DRAFT: DemoCreateDraft = {
profileName: "",
templateProfileId: "",
};
@@ -443,4 +443,3 @@ export function createExistingProxyIDPicker(oldSourceProxies: BrowserProxy[]) {
const pickExisting = createExistingProxyPicker(oldSourceProxies)
return (name: string, configText: string): string | null => pickExisting(name, configText)?.proxyId || null
}
@@ -109,4 +109,3 @@ export interface ChainSocks5Config {
first: ChainSocks5HopConfig
second: ChainSocks5HopConfig
}
@@ -1,4 +1,4 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import { useEffect, useMemo, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
import { Plus, Search, Wifi, X } from 'lucide-react'
import { ConfirmModal, toast } from '../../../shared/components'
@@ -459,4 +459,3 @@ export function ProxyPickerModal({ open, currentProxyId, title = '从代理池
document.body
)
}
@@ -1,4 +1,4 @@
import { useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent } from 'react'
import { useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent } from 'react'
import { Keyboard, Play, Search, Tag } from 'lucide-react'
import { Badge, Button, Modal, toast } from '../../../shared/components'
import { startBrowserInstanceByCode } from '../api'
@@ -487,4 +487,3 @@ export function QuickLaunchModal({ open, onClose }: QuickLaunchModalProps) {
</Modal>
)
}
@@ -454,4 +454,3 @@ export function mergeImportedScripts(
const deduped = new Map(imported.map((item) => [item.id, item]));
return [...imported, ...current.filter((item) => !deduped.has(item.id))];
}
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useState } from "react";
import { useNavigate } from "react-router-dom";
import { toast } from "../../../shared/components";
import { AutomationScriptHistoryModal } from "../components/AutomationScriptHistoryModal";
@@ -446,5 +446,3 @@ export function AutomationPage() {
</div>
);
}
@@ -242,4 +242,3 @@ export function AutomationScriptSummaryCard({
</div>
);
}
@@ -528,4 +528,3 @@ export function ExtensionManagementPage() {
)
}
@@ -1,4 +1,4 @@
import { Button, FormItem, Input, Modal, Select, Textarea } from '../../../../shared/components'
import { Button, FormItem, Input, Modal, Select, Textarea } from '../../../../shared/components'
import type { BrowserProxy } from '../../types'
import {
CHAIN_QUICK_IMPORT_TEMPLATE,
@@ -428,4 +428,3 @@ export function ProxyPoolImportModal({
</Modal>
)
}
@@ -1,4 +1,4 @@
import { Button, FormItem, Input, Modal, Select, Table, Textarea } from '../../../../shared/components'
import { Button, FormItem, Input, Modal, Select, Table, Textarea } from '../../../../shared/components'
import type { TableColumn } from '../../../../shared/components/Table'
import type { ProxyIPHealthResult } from '../../types'
@@ -336,6 +336,3 @@ export function ProxyPoolIPHealthDetailModal({
</Modal>
)
}
@@ -1,4 +1,4 @@
import type { ChainHopForm, ChainImportForm, ChainSocks5Config, ChainSocks5HopConfig, ImportCandidate } from './helpers.types'
import type { ChainHopForm, ChainImportForm, ChainSocks5Config, ChainSocks5HopConfig, ImportCandidate } from './helpers.types'
import { CHAIN_SOCKS5_PREFIX } from './helpers.types'
export function parseChainSocks5Config(proxyConfig: string): ChainSocks5Config | null {
@@ -239,4 +239,3 @@ export function parseChainImportJSON(raw: string): { form: ChainImportForm; grou
groupName,
}
}
@@ -1,4 +1,4 @@
import yaml from 'js-yaml'
import yaml from 'js-yaml'
import type { BrowserProxy } from '../../types'
import type { ClashProxy, ImportCandidate, ProxyDisplayInfo } from './helpers.types'
import { BUILTIN_PROXIES } from './helpers.types'
@@ -192,5 +192,3 @@ export function resolveImportedProxyName(proxy: ClashProxy, index: number, prefi
const rawName = (proxy.name || '').trim() || `导入代理 ${index + 1}`
return prefix ? `${prefix}-${rawName}` : rawName
}
@@ -1,4 +1,4 @@
import type { DirectImportForm, ImportCandidate } from './helpers.types'
import type { DirectImportForm, ImportCandidate } from './helpers.types'
function normalizeDirectProxyConfig(raw: string): string {
const trimmed = raw.trim()
@@ -276,4 +276,3 @@ export function buildDirectImportCandidatesFromText(raw: string): { candidates:
defaultGroupName,
}
}
@@ -1,4 +1,4 @@
import type { BrowserProxy } from '../../types'
import type { BrowserProxy } from '../../types'
import type { ClashProxy, URLImportSourceMeta } from './helpers.types'
import { nextProxyID, proxyToYaml, resolveImportedProxyName } from './helpers.clash'
@@ -165,5 +165,3 @@ export function buildRefreshedSourceProxies(
}
})
}
@@ -1,4 +1,4 @@
import type { BrowserProxy } from '../../types'
import type { BrowserProxy } from '../../types'
export const BUILTIN_PROXY_IDS = new Set(['__direct__'])
@@ -161,4 +161,3 @@ export interface URLImportSourceMeta {
sourceRefreshIntervalM: number
sourceLastRefreshAt: string
}
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import { Save, RotateCcw } from 'lucide-react'
import { Card, Button, ThemeSwitcher, toast } from '../../shared/components'
import {
@@ -438,5 +438,3 @@ export function SettingsPage() {
</div>
)
}
+145 -146
View File
@@ -1,15 +1,15 @@
export namespace automation {
export class ScriptPublicAPIVariable {
name: string;
defaultValue: string;
description: string;
required: boolean;
static createFrom(source: any = {}) {
return new ScriptPublicAPIVariable(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@@ -28,11 +28,11 @@ export namespace automation {
requestBodyText: string;
responseBodyText: string;
variables: ScriptPublicAPIVariable[];
static createFrom(source: any = {}) {
return new ScriptPublicAPIConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.enabled = source["enabled"];
@@ -45,7 +45,7 @@ export namespace automation {
this.responseBodyText = source["responseBodyText"];
this.variables = this.convertValues(source["variables"], ScriptPublicAPIVariable);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -64,18 +64,18 @@ export namespace automation {
return a;
}
}
export class ScriptSource {
type: string;
uri: string;
ref: string;
path: string;
importedAt: string;
static createFrom(source: any = {}) {
return new ScriptSource(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.type = source["type"];
@@ -92,11 +92,11 @@ export namespace automation {
groupId: string;
keywords: string[];
tags: string[];
static createFrom(source: any = {}) {
return new ScriptTargetSelector(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.code = source["code"];
@@ -112,11 +112,11 @@ export namespace automation {
selector: ScriptTargetSelector;
templateSelector: ScriptTargetSelector;
createNameTemplate: string;
static createFrom(source: any = {}) {
return new ScriptTargetConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.mode = source["mode"];
@@ -124,7 +124,7 @@ export namespace automation {
this.templateSelector = this.convertValues(source["templateSelector"], ScriptTargetSelector);
this.createNameTemplate = source["createNameTemplate"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -162,11 +162,11 @@ export namespace automation {
source: ScriptSource;
createdAt: string;
updatedAt: string;
static createFrom(source: any = {}) {
return new ScriptRecord(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.packageFormat = source["packageFormat"];
@@ -188,7 +188,7 @@ export namespace automation {
this.createdAt = source["createdAt"];
this.updatedAt = source["updatedAt"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -220,11 +220,11 @@ export namespace automation {
startedAt: string;
finishedAt: string;
durationMs: number;
static createFrom(source: any = {}) {
return new ScriptRunRecord(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@@ -250,11 +250,11 @@ export namespace automation {
useScriptSelector: boolean;
useScriptParams: boolean;
timeoutMs?: number;
static createFrom(source: any = {}) {
return new ScriptRunRequest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.scriptId = source["scriptId"];
@@ -267,21 +267,21 @@ export namespace automation {
this.timeoutMs = source["timeoutMs"];
}
}
}
export namespace backend {
export class AutomationScriptImportIssue {
path: string;
message: string;
static createFrom(source: any = {}) {
return new AutomationScriptImportIssue(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.path = source["path"];
@@ -292,18 +292,18 @@ export namespace backend {
imported: automation.ScriptRecord[];
failed: AutomationScriptImportIssue[];
scanned: number;
static createFrom(source: any = {}) {
return new AutomationScriptBatchImportResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.imported = this.convertValues(source["imported"], automation.ScriptRecord);
this.failed = this.convertValues(source["failed"], AutomationScriptImportIssue);
this.scanned = source["scanned"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -322,7 +322,7 @@ export namespace backend {
return a;
}
}
export class AutomationScriptPublicAPIInvokeInput {
url: string;
method: string;
@@ -330,11 +330,11 @@ export namespace backend {
apiKey: string;
authHeader: string;
timeoutMs: number;
static createFrom(source: any = {}) {
return new AutomationScriptPublicAPIInvokeInput(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.url = source["url"];
@@ -351,11 +351,11 @@ export namespace backend {
statusText: string;
bodyText: string;
bodyJson: any;
static createFrom(source: any = {}) {
return new AutomationScriptPublicAPIInvokeResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.ok = source["ok"];
@@ -372,11 +372,11 @@ export namespace backend {
failed: number;
skippedList: string[];
failedList: string[];
static createFrom(source: any = {}) {
return new BookmarkSyncResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.total = source["total"];
@@ -392,11 +392,11 @@ export namespace backend {
filePath: string;
sizeBytes: number;
updatedAt: string;
static createFrom(source: any = {}) {
return new BrowserExtensionManualDownloadFile(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.fileName = source["fileName"];
@@ -411,11 +411,11 @@ export namespace backend {
downloadUrl: string;
downloadDir: string;
fileName: string;
static createFrom(source: any = {}) {
return new BrowserExtensionManualInstallGuide(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.extensionId = source["extensionId"];
@@ -429,11 +429,11 @@ export namespace backend {
query: string;
useProxy: boolean;
proxyConfig: string;
static createFrom(source: any = {}) {
return new BrowserExtensionWebStoreRequest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.query = source["query"];
@@ -450,11 +450,11 @@ export namespace backend {
httpOnly: boolean;
secure: boolean;
sameSite: string;
static createFrom(source: any = {}) {
return new CookieInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@@ -471,11 +471,11 @@ export namespace backend {
maxLimit: number;
usedCount: number;
usedKeys: string[];
static createFrom(source: any = {}) {
return new LicenseStatus(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.maxLimit = source["maxLimit"];
@@ -490,11 +490,11 @@ export namespace backend {
socksUrl: string;
latencyMs: number;
error: string;
static createFrom(source: any = {}) {
return new ProxyBridgeWarmupResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -510,11 +510,11 @@ export namespace backend {
urls: string[];
concurrency: number;
timeoutMs: number;
static createFrom(source: any = {}) {
return new ProxyBrowserProbeRequest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -534,11 +534,11 @@ export namespace backend {
failed: number;
concurrency: number;
error: string;
static createFrom(source: any = {}) {
return new ProxyBrowserProbeResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -565,11 +565,11 @@ export namespace backend {
installDir: string;
binaryName: string;
message: string;
static createFrom(source: any = {}) {
return new ProxyCoreDownloadInfoResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.core = source["core"];
@@ -591,11 +591,11 @@ export namespace backend {
goarch: string;
proxyConfig: string;
version: string;
static createFrom(source: any = {}) {
return new ProxyCoreDownloadRequest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.core = source["core"];
@@ -615,11 +615,11 @@ export namespace backend {
binaryPath: string;
source: string;
message: string;
static createFrom(source: any = {}) {
return new ProxyCoreStatusResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.core = source["core"];
@@ -648,11 +648,11 @@ export namespace backend {
asOrganization: string;
rawData: Record<string, any>;
updatedAt: string;
static createFrom(source: any = {}) {
return new ProxyIPHealthResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -675,11 +675,11 @@ export namespace backend {
label: string;
timezone: string;
lang: string;
static createFrom(source: any = {}) {
return new ProxyLocationOption(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.label = source["label"];
@@ -702,11 +702,11 @@ export namespace backend {
health?: ProxyIPHealthResult;
alternates?: ProxyLocationOption[];
resolvedAt: string;
static createFrom(source: any = {}) {
return new ProxyLocationResolveResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -724,7 +724,7 @@ export namespace backend {
this.alternates = this.convertValues(source["alternates"], ProxyLocationOption);
this.resolvedAt = source["resolvedAt"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -749,11 +749,11 @@ export namespace backend {
latencyMs: number;
engine: string;
error: string;
static createFrom(source: any = {}) {
return new ProxyTestResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -766,11 +766,11 @@ export namespace backend {
export class ProxyValidationResult {
supported: boolean;
errorMsg: string;
static createFrom(source: any = {}) {
return new ProxyValidationResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.supported = source["supported"];
@@ -784,11 +784,11 @@ export namespace backend {
sizeMB: number;
createdAt: string;
filePath?: string;
static createFrom(source: any = {}) {
return new SnapshotInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.snapshotId = source["snapshotId"];
@@ -803,7 +803,7 @@ export namespace backend {
}
export namespace backup {
export class ManifestEntry {
id: string;
category: string;
@@ -811,11 +811,11 @@ export namespace backup {
required: boolean;
archivePath: string;
description?: string;
static createFrom(source: any = {}) {
return new ManifestEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@@ -829,11 +829,11 @@ export namespace backup {
export class ManifestAppInfo {
name: string;
version: string;
static createFrom(source: any = {}) {
return new ManifestAppInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@@ -846,11 +846,11 @@ export namespace backup {
createdAt: string;
app: ManifestAppInfo;
entries: ManifestEntry[];
static createFrom(source: any = {}) {
return new Manifest(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.format = source["format"];
@@ -859,7 +859,7 @@ export namespace backup {
this.app = this.convertValues(source["app"], ManifestAppInfo);
this.entries = this.convertValues(source["entries"], ManifestEntry);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -878,8 +878,8 @@ export namespace backup {
return a;
}
}
export class ScopeEntry {
id: string;
category: string;
@@ -889,11 +889,11 @@ export namespace backup {
archivePath: string;
exists: boolean;
description?: string;
static createFrom(source: any = {}) {
return new ScopeEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@@ -911,11 +911,11 @@ export namespace backup {
manifestVersion: number;
appRoot: string;
entries: ScopeEntry[];
static createFrom(source: any = {}) {
return new Scope(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.format = source["format"];
@@ -923,7 +923,7 @@ export namespace backup {
this.appRoot = source["appRoot"];
this.entries = this.convertValues(source["entries"], ScopeEntry);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -946,16 +946,16 @@ export namespace backup {
}
export namespace browser {
export class CoreExtendedInfo {
coreId: string;
chromeVersion: string;
instanceCount: number;
static createFrom(source: any = {}) {
return new CoreExtendedInfo(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.coreId = source["coreId"];
@@ -968,11 +968,11 @@ export namespace browser {
coreName: string;
corePath: string;
isDefault: boolean;
static createFrom(source: any = {}) {
return new CoreInput(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.coreId = source["coreId"];
@@ -984,11 +984,11 @@ export namespace browser {
export class CoreValidateResult {
valid: boolean;
message: string;
static createFrom(source: any = {}) {
return new CoreValidateResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.valid = source["valid"];
@@ -1007,11 +1007,11 @@ export namespace browser {
enabled: boolean;
installedAt: string;
updatedAt: string;
static createFrom(source: any = {}) {
return new Extension(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.extensionId = source["extensionId"];
@@ -1035,11 +1035,11 @@ export namespace browser {
storeUrl: string;
installable: boolean;
message: string;
static createFrom(source: any = {}) {
return new ExtensionLookupResult(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.extensionId = source["extensionId"];
@@ -1058,11 +1058,11 @@ export namespace browser {
sortOrder: number;
createdAt: string;
updatedAt: string;
static createFrom(source: any = {}) {
return new Group(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.groupId = source["groupId"];
@@ -1077,11 +1077,11 @@ export namespace browser {
groupName: string;
parentId: string;
sortOrder: number;
static createFrom(source: any = {}) {
return new GroupInput(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.groupName = source["groupName"];
@@ -1097,11 +1097,11 @@ export namespace browser {
createdAt: string;
updatedAt: string;
instanceCount: number;
static createFrom(source: any = {}) {
return new GroupWithCount(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.groupId = source["groupId"];
@@ -1141,11 +1141,11 @@ export namespace browser {
deletedAt: string;
lastStartAt: string;
lastStopAt: string;
static createFrom(source: any = {}) {
return new Profile(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.profileId = source["profileId"];
@@ -1180,11 +1180,11 @@ export namespace browser {
export class ProfileCopyOptions {
mode: string;
automationTargets: string[];
static createFrom(source: any = {}) {
return new ProfileCopyOptions(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.mode = source["mode"];
@@ -1196,11 +1196,11 @@ export namespace browser {
configured: boolean;
extensionIds: string[];
updatedAt: string;
static createFrom(source: any = {}) {
return new ProfileExtensionSettings(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.profileId = source["profileId"];
@@ -1220,11 +1220,11 @@ export namespace browser {
tags: string[];
keywords: string[];
groupId: string;
static createFrom(source: any = {}) {
return new ProfileInput(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.profileName = source["profileName"];
@@ -1249,11 +1249,11 @@ export namespace browser {
startReadyTimeoutMs: number;
startStableWindowMs: number;
defaultConnectorType: string;
static createFrom(source: any = {}) {
return new Settings(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.userDataRoot = source["userDataRoot"];
@@ -1272,11 +1272,11 @@ export namespace browser {
title: string;
url: string;
active: boolean;
static createFrom(source: any = {}) {
return new Tab(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.tabId = source["tabId"];
@@ -1289,16 +1289,16 @@ export namespace browser {
}
export namespace config {
export class BrowserBookmark {
name: string;
url: string;
openOnStart: boolean;
static createFrom(source: any = {}) {
return new BrowserBookmark(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.name = source["name"];
@@ -1311,11 +1311,11 @@ export namespace config {
coreName: string;
corePath: string;
isDefault: boolean;
static createFrom(source: any = {}) {
return new BrowserCore(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.coreId = source["coreId"];
@@ -1342,11 +1342,11 @@ export namespace config {
lastTestOk: boolean;
lastTestedAt: string;
lastIPHealthJson?: string;
static createFrom(source: any = {}) {
return new BrowserProxy(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -1376,11 +1376,11 @@ export namespace config {
parser?: string;
timeoutMs?: number;
expectedStatus?: number[];
static createFrom(source: any = {}) {
return new ProxyCheckTarget(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.id = source["id"];
@@ -1397,11 +1397,11 @@ export namespace config {
speedTargetId: string;
ipHealthTargetId: string;
targets: ProxyCheckTarget[];
static createFrom(source: any = {}) {
return new ProxyCheckConfig(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.bridgeStartTimeoutMs = source["bridgeStartTimeoutMs"];
@@ -1409,7 +1409,7 @@ export namespace config {
this.ipHealthTargetId = source["ipHealthTargetId"];
this.targets = this.convertValues(source["targets"], ProxyCheckTarget);
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -1432,18 +1432,18 @@ export namespace config {
}
export namespace launchcode {
export class LaunchRequestParams {
launchArgs: string[];
startUrls: string[];
skipDefaultStartUrls: boolean;
proxyId: string;
proxyConfig: string;
static createFrom(source: any = {}) {
return new LaunchRequestParams(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.launchArgs = source["launchArgs"];
@@ -1457,18 +1457,18 @@ export namespace launchcode {
}
export namespace logger {
export class MemoryLogEntry {
time: string;
level: string;
component: string;
message: string;
fields?: Record<string, any>;
static createFrom(source: any = {}) {
return new MemoryLogEntry(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.time = source["time"];
@@ -1479,22 +1479,22 @@ export namespace logger {
}
}
export class MethodInterceptor {
static createFrom(source: any = {}) {
return new MethodInterceptor(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
}
export namespace proxy {
export class DnsDiagnosticSummary {
hasConfig: boolean;
sourceFormat: string;
@@ -1503,11 +1503,11 @@ export namespace proxy {
fallbackCount: number;
xrayServerCount: number;
unsupported: string[];
static createFrom(source: any = {}) {
return new DnsDiagnosticSummary(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.hasConfig = source["hasConfig"];
@@ -1529,11 +1529,11 @@ export namespace proxy {
bridgeAlive: boolean;
bridgePort: number;
lastError: string;
static createFrom(source: any = {}) {
return new ProxyRuntimeDiagnostic(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.workDir = source["workDir"];
@@ -1564,11 +1564,11 @@ export namespace proxy {
outbound: Record<string, any>;
runtime: ProxyRuntimeDiagnostic;
errors: string[];
static createFrom(source: any = {}) {
return new ProxyBuildDiagnostic(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.proxyId = source["proxyId"];
@@ -1588,7 +1588,7 @@ export namespace proxy {
this.runtime = this.convertValues(source["runtime"], ProxyRuntimeDiagnostic);
this.errors = source["errors"];
}
convertValues(a: any, classs: any, asMap: boolean = false): any {
if (!a) {
return a;
@@ -1609,4 +1609,3 @@ export namespace proxy {
}
}