refactor: reorganize imports and update type references across services
- Updated import paths for types and utilities in config-service, menu-service, script-execution-service, script-store-service, and window-service to reflect new structure. - Moved utility functions like debounce and cloneDeep to shared utilities. - Created new runtime and script types files to centralize type definitions. - Removed deprecated task-types and locale messages files. - Updated constants to use shared definitions and added new placeholders for providers. - Enhanced provider type information with additional placeholders for different languages.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { BrowserWindow, ipcMain } from 'electron'
|
||||
import type { ConfigKeys, IConfig } from '@runtime/lib/types'
|
||||
import { CONFIG_KEYS, IPC_EVENTS } from '@runtime/lib/constants'
|
||||
import { debounce } from '@runtime/lib/utils'
|
||||
|
||||
import logManager from '@electron/service/logger'
|
||||
import type { ConfigKeys, IConfig } from '@electron/types/runtime'
|
||||
import { getUserDataDir } from '@electron/utils/paths'
|
||||
import { debounce } from '@electron/utils/shared'
|
||||
|
||||
type AppConfig = IConfig & {
|
||||
[CONFIG_KEYS.GATEWAY_AUTO_START]: boolean;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ipcMain, Menu, type MenuItemConstructorOptions } from 'electron';
|
||||
import { CONFIG_KEYS, IPC_EVENTS } from '@runtime/lib/constants';
|
||||
import { cloneDeep } from '@runtime/lib/utils';
|
||||
import { createTranslator } from '@electron/utils'
|
||||
import { cloneDeep } from '@electron/utils/shared';
|
||||
import logManager from '@electron/service/logger'
|
||||
import configManager from '@electron/service/config-service'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
getScriptPathById,
|
||||
updateLastRun,
|
||||
} from '@electron/service/script-store-service';
|
||||
import type { ScriptExecutionResult } from '@runtime/lib/script-types';
|
||||
import type { ScriptExecutionResult } from '../../types/script-types';
|
||||
|
||||
const executor = new executeScriptService();
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
ScriptMetaItem,
|
||||
ScriptsMeta,
|
||||
ScriptSaveInput,
|
||||
} from '@runtime/lib/script-types';
|
||||
} from '../../types/script-types';
|
||||
|
||||
const META_FILENAME = 'scripts.meta.json';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WindowNames } from '@runtime/lib/types'
|
||||
import type { WindowNames } from '@electron/types/runtime'
|
||||
|
||||
import { CONFIG_KEYS, IPC_EVENTS, WINDOW_NAMES } from '@runtime/lib/constants'
|
||||
import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain, IpcMainInvokeEvent, type IpcMainEvent } from 'electron'
|
||||
|
||||
Reference in New Issue
Block a user