chore: sort skill sync imports

This commit is contained in:
Danny Avila 2026-06-06 12:48:04 -04:00
parent a7d1fce255
commit c1c8aa1e41
20 changed files with 74 additions and 74 deletions

View file

@ -6,8 +6,8 @@ import {
INTERFACE_PERMISSION_FIELDS,
PERMISSION_SUB_KEYS,
} from 'librechat-data-provider';
import type { TCustomConfig } from 'librechat-data-provider';
import type { AppConfig, ConfigSection, IConfig } from '@librechat/data-schemas';
import type { TCustomConfig } from 'librechat-data-provider';
import type { Types, ClientSession } from 'mongoose';
import type { Response } from 'express';
import type { CapabilityUser } from '~/middleware/capabilities';

View file

@ -1,5 +1,3 @@
import type { Request, Response } from 'express';
import type { Types } from 'mongoose';
import type {
TGitHubSkillSyncStatusResponse,
TGitHubSkillSyncSourceStatus,
@ -12,6 +10,8 @@ import type {
SkillSyncCredentialSummary,
UpsertSkillSyncCredentialInput,
} from '@librechat/data-schemas';
import type { Request, Response } from 'express';
import type { Types } from 'mongoose';
import type { GitHubSkillSyncRunner } from '~/skills/sync';
type AdminSkillsRequest = Request & {

View file

@ -5,19 +5,6 @@ import {
PrincipalType,
PermissionBits,
} from 'librechat-data-provider';
import type { Response } from 'express';
import type { Types } from 'mongoose';
import type {
ISkill,
ISkillFile,
ISkillSummary,
CreateSkillInput,
CreateSkillResult,
UpdateSkillInput,
ListSkillsByAccessResult,
UpdateSkillResult,
ValidationIssue,
} from '@librechat/data-schemas';
import type {
TSkill,
TSkillFile,
@ -31,6 +18,19 @@ import type {
TSkillConflictResponse,
TSkillFileContentResponse,
} from 'librechat-data-provider';
import type {
ISkill,
ISkillFile,
ISkillSummary,
CreateSkillInput,
CreateSkillResult,
UpdateSkillInput,
ListSkillsByAccessResult,
UpdateSkillResult,
ValidationIssue,
} from '@librechat/data-schemas';
import type { Response } from 'express';
import type { Types } from 'mongoose';
import type { ServerRequest, StrategyFunctions } from '~/types';
import { isBinaryBuffer } from './binary';

View file

@ -1,10 +1,8 @@
import crypto from 'crypto';
import path from 'path';
import JSZip from 'jszip';
import { ResourceType, AccessRoleIds, PrincipalType } from 'librechat-data-provider';
import crypto from 'crypto';
import { logger } from '@librechat/data-schemas';
import type { Request, Response } from 'express';
import type { Types } from 'mongoose';
import { ResourceType, AccessRoleIds, PrincipalType } from 'librechat-data-provider';
import type {
ISkill,
ISkillFile,
@ -12,6 +10,8 @@ import type {
CreateSkillResult,
UpsertSkillFileInput,
} from '@librechat/data-schemas';
import type { Request, Response } from 'express';
import type { Types } from 'mongoose';
import type { ImportLimits } from './limits';
import { resolveRequestTenantId } from '~/middleware/tenant';
import { DEFAULT_SKILL_IMPORT_LIMITS } from './limits';

View file

@ -1,5 +1,6 @@
import crypto from 'crypto';
import { Types } from 'mongoose';
import { getTenantId } from '@librechat/data-schemas';
import type {
ISkill,
ISkillFile,
@ -8,10 +9,9 @@ import type {
ISkillSyncStatus,
SkillSyncStatusInput,
} from '@librechat/data-schemas';
import { getTenantId } from '@librechat/data-schemas';
import type { GitHubSkillSyncDeps } from './github';
import { DEFAULT_SKILL_IMPORT_LIMITS } from '../limits';
import { createGitHubSkillSyncRunner } from './github';
import type { GitHubSkillSyncDeps } from './github';
function response(body: unknown, status = 200, headers: Record<string, string> = {}): Response {
const normalizedHeaders = new Map(

View file

@ -1,14 +1,13 @@
import crypto from 'crypto';
import path from 'path';
import crypto from 'crypto';
import { Types } from 'mongoose';
import { logger, tenantStorage } from '@librechat/data-schemas';
import {
ResourceType,
PrincipalType,
AccessRoleIds,
SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH,
} from 'librechat-data-provider';
import { logger, tenantStorage } from '@librechat/data-schemas';
import type { SkillSyncConfig, SkillSyncGitHubSourceConfig } from 'librechat-data-provider';
import type {
ISkill,
ISkillFile,
@ -22,6 +21,7 @@ import type {
SkillSyncCredentialSummary,
SkillSyncStatusInput,
} from '@librechat/data-schemas';
import type { SkillSyncConfig, SkillSyncGitHubSourceConfig } from 'librechat-data-provider';
import { DEFAULT_SKILL_IMPORT_LIMITS } from '../limits';
import { parseSkillMarkdown } from '../parse';

View file

@ -1,6 +1,6 @@
import type { SkillSyncConfig } from 'librechat-data-provider';
import type { GitHubSkillSyncRunner } from './github';
import type { SkillSyncTriggerRunnerFactoryInput } from './orchestrator';
import type { GitHubSkillSyncRunner } from './github';
import { createSkillSyncTriggerOrchestrator } from './orchestrator';
type RunnerStatus = Awaited<ReturnType<GitHubSkillSyncRunner['getStatus']>>;

View file

@ -1,7 +1,7 @@
import type { SkillSyncConfig } from 'librechat-data-provider';
import { __resetShutdownStateForTests } from '~/app/shutdown';
import { SKILL_SYNC_MAX_TIMER_INTERVAL_MINUTES, startGitHubSkillSyncScheduler } from './scheduler';
import type { GitHubSkillSyncRunner } from './github';
import { SKILL_SYNC_MAX_TIMER_INTERVAL_MINUTES, startGitHubSkillSyncScheduler } from './scheduler';
import { __resetShutdownStateForTests } from '~/app/shutdown';
const source = {
id: 'librechat-skills',

View file

@ -1,7 +1,7 @@
import type { SkillSyncConfig } from 'librechat-data-provider';
import { logger } from '@librechat/data-schemas';
import { registerShutdownTask } from '~/app/shutdown';
import type { SkillSyncConfig } from 'librechat-data-provider';
import type { GitHubSkillSyncRunner } from './github';
import { registerShutdownTask } from '~/app/shutdown';
const NODE_TIMER_MAX_MS = 2147483647;
const SKILL_SYNC_MIN_INTERVAL_MINUTES = 5;

View file

@ -1,7 +1,7 @@
import type { StartupConfigContext } from './config';
import type { AssistantsEndpoint } from './schemas';
import * as q from './types/queries';
import { ResourceType } from './accessPermissions';
import * as q from './types/queries';
let BASE_URL = '';
if (

View file

@ -10,11 +10,11 @@ import {
} from './schemas';
import { ComponentTypes, SettingTypes, OptionTypes } from './generate';
import { specsConfigSchema, TSpecsConfig } from './models';
import { REFILL_INTERVAL_UNITS } from './balance';
import { fileConfigSchema } from './file-config';
import { apiBaseUrl } from './api-endpoints';
import { FileSources } from './types/files';
import { MCPServersSchema } from './mcp';
import { REFILL_INTERVAL_UNITS } from './balance';
export const defaultSocialLogins = ['google', 'facebook', 'openid', 'github', 'discord', 'saml'];

View file

@ -1,6 +1,6 @@
import { INTERFACE_PERMISSION_FIELDS, PermissionTypes } from 'librechat-data-provider';
import { mergeConfigOverrides } from './resolution';
import type { AppConfig, IConfig } from '~/types';
import { mergeConfigOverrides } from './resolution';
function fakeConfig(
overrides: Record<string, unknown>,

View file

@ -1,10 +1,10 @@
import type { RoleMethods, RoleDeps } from './role';
import { createSessionMethods, DEFAULT_REFRESH_TOKEN_EXPIRY, type SessionMethods } from './session';
import { createUserMethods, DEFAULT_SESSION_EXPIRY, type UserMethods } from './user';
import { createTokenMethods, type TokenMethods } from './token';
import { createRoleMethods, RoleConflictError } from './role';
import type { RoleMethods, RoleDeps } from './role';
import { createUserMethods, DEFAULT_SESSION_EXPIRY, type UserMethods } from './user';
import { createKeyMethods, type KeyMethods } from './key';
import { createFileMethods, type FileMethods } from './file';
import { createKeyMethods, type KeyMethods } from './key';
/* Memories */
import { createMemoryMethods, type MemoryMethods } from './memory';
/* Agent Categories */

View file

@ -1,4 +1,5 @@
import mongoose from 'mongoose';
import { logger, createModels } from '..';
import { MongoMemoryServer } from 'mongodb-memory-server';
import {
SystemRoles,
@ -7,7 +8,6 @@ import {
PrincipalType,
PermissionBits,
} from 'librechat-data-provider';
import { createAclEntryMethods } from './aclEntry';
import {
validateSkillName,
validateSkillDescription,
@ -17,7 +17,7 @@ import {
inferSkillFileCategory,
deriveStructuredFrontmatterFields,
} from './skill';
import { logger, createModels } from '..';
import { createAclEntryMethods } from './aclEntry';
import { createMethods } from './index';
logger.silent = true;

View file

@ -16,8 +16,8 @@ import type {
ISkillFileDocument,
ISkillSummary,
} from '~/types/skill';
import { isValidObjectIdString } from '~/utils/objectId';
import { tenantSafeBulkWrite } from '~/utils/tenantBulkWrite';
import { isValidObjectIdString } from '~/utils/objectId';
import { stripYamlTrailingComment } from '~/utils/yaml';
import { escapeRegExp } from '~/utils/string';
import logger from '~/config/winston';

View file

@ -1,9 +1,9 @@
import mongoose from 'mongoose';
import { MongoMemoryServer } from 'mongodb-memory-server';
import { createModels } from '../models';
import { createSkillSyncMethods } from './skillSync';
import type { ISkillSyncCredential } from '~/types/skillSync';
import { createSkillSyncMethods } from './skillSync';
import { encryptV2, decryptV2 } from '~/crypto';
import { createModels } from '../models';
jest.mock('~/crypto', () => ({
encryptV2: jest.fn(async (value: string) => `encrypted:${value}`),

View file

@ -1,6 +1,5 @@
import { createHash } from 'crypto';
import type { Model, Types } from 'mongoose';
import { encryptV2, decryptV2 } from '~/crypto';
import type {
ISkillSyncStatus,
SkillSyncProvider,
@ -9,6 +8,7 @@ import type {
ISkillSyncCredential,
ISkillSyncCredentialDocument,
} from '~/types/skillSync';
import { encryptV2, decryptV2 } from '~/crypto';
const LOCK_SOURCE_ID = '__global_lock__';

View file

@ -1,38 +1,38 @@
import { createUserModel } from './user';
import { createTokenModel } from './token';
import { createSessionModel } from './session';
import { createBalanceModel } from './balance';
import { createConversationModel } from './convo';
import { createChatProjectModel } from './chatProject';
import { createMessageModel } from './message';
import { createAgentModel } from './agent';
import { createAgentApiKeyModel } from './agentApiKey';
import { createAgentCategoryModel } from './agentCategory';
import { createMCPServerModel } from './mcpServer';
import { createRoleModel } from './role';
import { createActionModel } from './action';
import { createAssistantModel } from './assistant';
import { createFileModel } from './file';
import { createBannerModel } from './banner';
import { createKeyModel } from './key';
import { createPluginAuthModel } from './pluginAuth';
import { createTransactionModel } from './transaction';
import { createPresetModel } from './preset';
import { createPromptModel } from './prompt';
import { createPromptGroupModel } from './promptGroup';
import { createSkillModel } from './skill';
import { createSkillFileModel } from './skillFile';
import { createSkillSyncCredentialModel } from './skillSyncCredential';
import { createSkillSyncStatusModel } from './skillSyncStatus';
import { createConversationTagModel } from './conversationTag';
import { createSharedLinkModel } from './sharedLink';
import { createToolCallModel } from './toolCall';
import { createMemoryModel } from './memory';
import { createAccessRoleModel } from './accessRole';
import { createAclEntryModel } from './aclEntry';
import { createAgentCategoryModel } from './agentCategory';
import { createChatProjectModel } from './chatProject';
import { createAgentApiKeyModel } from './agentApiKey';
import { createTransactionModel } from './transaction';
import { createPromptGroupModel } from './promptGroup';
import { createSystemGrantModel } from './systemGrant';
import { createGroupModel } from './group';
import { createPluginAuthModel } from './pluginAuth';
import { createSharedLinkModel } from './sharedLink';
import { createAccessRoleModel } from './accessRole';
import { createMCPServerModel } from './mcpServer';
import { createAssistantModel } from './assistant';
import { createSkillFileModel } from './skillFile';
import { createConversationModel } from './convo';
import { createToolCallModel } from './toolCall';
import { createAclEntryModel } from './aclEntry';
import { createSessionModel } from './session';
import { createBalanceModel } from './balance';
import { createMessageModel } from './message';
import { createActionModel } from './action';
import { createBannerModel } from './banner';
import { createPresetModel } from './preset';
import { createPromptModel } from './prompt';
import { createMemoryModel } from './memory';
import { createConfigModel } from './config';
import { createTokenModel } from './token';
import { createAgentModel } from './agent';
import { createSkillModel } from './skill';
import { createGroupModel } from './group';
import { createUserModel } from './user';
import { createRoleModel } from './role';
import { createFileModel } from './file';
import { createKeyModel } from './key';
/**
* Creates all database models for all collections

View file

@ -1,5 +1,5 @@
import skillSyncCredentialSchema from '~/schema/skillSyncCredential';
import type { ISkillSyncCredentialDocument } from '~/types/skillSync';
import skillSyncCredentialSchema from '~/schema/skillSyncCredential';
export function createSkillSyncCredentialModel(mongoose: typeof import('mongoose')) {
// GitHub skill sync is intentionally app-wide in v1; credentials are referenced by

View file

@ -1,5 +1,5 @@
import skillSyncStatusSchema from '~/schema/skillSyncStatus';
import type { ISkillSyncStatusDocument } from '~/types/skillSync';
import skillSyncStatusSchema from '~/schema/skillSyncStatus';
export function createSkillSyncStatusModel(mongoose: typeof import('mongoose')) {
// GitHub skill sync status supports app-wide YAML sources and tenant-scoped