@myassis/gateway 1.0.8 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/middleware/auth.js +1 -1
- package/dist/routes/agent.js +4 -4
- package/dist/services/LocalTaskService.js +1 -1
- package/dist/services/NotificationService.js +3 -3
- package/dist/services/TaskSchedulerService.js +5 -5
- package/dist/services/TaskService.js +3 -3
- package/dist/services/agent/Agent.js +1 -1
- package/dist/services/agent/AgentManager.js +4 -4
- package/dist/services/dataService.js +3 -3
- package/dist/services/llm/LLMClient.js +1 -1
- package/dist/services/memory/MemoryManager.js +5 -5
- package/dist/services/session/Session.js +11 -11
- package/dist/services/session/SessionManager.js +3 -3
- package/dist/services/session/SessionStore.js +1 -1
- package/dist/services/systemPrompt.js +2 -2
- package/dist/services/task/PushTokenStore.js +1 -1
- package/dist/services/task/TaskStore.js +1 -1
- package/dist/services/tools/index.js +14 -14
- package/dist/services/tools/model.js +2 -2
- package/dist/services/tools/sessionsSpawn.js +1 -1
- package/dist/services/tools/skill.js +2 -2
- package/dist/services/tools/task.js +1 -1
- package/package.json +2 -2
- package/scripts/fix-esm-imports.js +83 -0
package/dist/middleware/auth.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 从请求头 Authorization: Bearer <token> 解码 JWT,提取 userId
|
|
4
4
|
* 同时保留原始 token 供路由转发给 Server
|
|
5
5
|
*/
|
|
6
|
-
import { authStore } from '../stores';
|
|
6
|
+
import { authStore } from '../stores/authStore.js';
|
|
7
7
|
import { getLogger } from '@myassis/shared';
|
|
8
8
|
const logger = getLogger('middleware/auth');
|
|
9
9
|
const JWT_SECRET = process.env.JWT_SECRET || 'your-secret-key-change-in-production';
|
package/dist/routes/agent.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
2
|
import { requireAuth } from '../middleware/auth.js';
|
|
3
3
|
import { runWithToken } from '../api/index.js';
|
|
4
|
-
import { getSessionManager } from '../services/session';
|
|
5
|
-
import { initAgentManager, agentManagerMap } from '../services/agent/AgentManager';
|
|
6
|
-
import { AgentStore } from '../services/agent/AgentStore';
|
|
4
|
+
import { getSessionManager } from '../services/session/index.js';
|
|
5
|
+
import { initAgentManager, agentManagerMap } from '../services/agent/AgentManager.js';
|
|
6
|
+
import { AgentStore } from '../services/agent/AgentStore.js';
|
|
7
7
|
import { getLogger } from '@myassis/shared';
|
|
8
8
|
const logger = getLogger('AgentRoutes');
|
|
9
|
-
import { sessionStore } from '../services/session/SessionStore';
|
|
9
|
+
import { sessionStore } from '../services/session/SessionStore.js';
|
|
10
10
|
const router = Router();
|
|
11
11
|
// 所有路由需要认证
|
|
12
12
|
router.use(requireAuth, (req, _res, next) => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 使用 SQLite 数据库存储任务
|
|
6
6
|
*/
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
-
import { TaskStore } from './task/TaskStore';
|
|
8
|
+
import { TaskStore } from './task/TaskStore.js';
|
|
9
9
|
import { getLogger, sharedTaskService, formatUTCForLog } from '@myassis/shared';
|
|
10
10
|
const logger = getLogger('LocalTaskService');
|
|
11
11
|
class LocalTaskService {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* 负责发送任务通知
|
|
4
4
|
* 优先级:WebSocket > HMS Push (华为) / Expo Push (其他)
|
|
5
5
|
*/
|
|
6
|
-
import { PushTokenStore } from './task/PushTokenStore';
|
|
7
|
-
import { webSocketService } from './WebSocketService';
|
|
8
|
-
import { hmsPushService } from './HMSPushService';
|
|
6
|
+
import { PushTokenStore } from './task/PushTokenStore.js';
|
|
7
|
+
import { webSocketService } from './WebSocketService.js';
|
|
8
|
+
import { hmsPushService } from './HMSPushService.js';
|
|
9
9
|
import { getLogger } from '@myassis/shared';
|
|
10
10
|
const logger = getLogger('NotificationService');
|
|
11
11
|
const log = logger;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* 基于 SQLite 数据库的任务调度
|
|
4
4
|
* 每分钟检查待执行任务并发送通知
|
|
5
5
|
*/
|
|
6
|
-
import { taskStore } from './task/TaskStore';
|
|
7
|
-
import { webSocketService } from './WebSocketService';
|
|
8
|
-
import { getSessionManager } from './session';
|
|
6
|
+
import { taskStore } from './task/TaskStore.js';
|
|
7
|
+
import { webSocketService } from './WebSocketService.js';
|
|
8
|
+
import { getSessionManager } from './session/index.js';
|
|
9
9
|
import { getLogger, getUTCTimeKey, formatUTCForLog, holidayService } from '@myassis/shared';
|
|
10
|
-
import { tasksService } from './dataService';
|
|
11
|
-
import { authStore } from '../stores';
|
|
10
|
+
import { tasksService } from './dataService.js';
|
|
11
|
+
import { authStore } from '../stores/authStore.js';
|
|
12
12
|
const logger = getLogger('TaskSchedulerService');
|
|
13
13
|
const EXPIRED_THRESHOLD = 60 * 60 * 1000; // 1小时
|
|
14
14
|
const CHECK_INTERVAL = 60 * 1000; // 1分钟
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* - platformApply === currentPlatform → 本地 SQLite 存储(localTaskService)
|
|
8
8
|
* - platformApply !== currentPlatform → 服务器 API(tasksApi)
|
|
9
9
|
*/
|
|
10
|
-
import { authStore } from '../stores';
|
|
11
|
-
import { tasksApi } from '../api';
|
|
12
|
-
import { localTaskService } from './LocalTaskService';
|
|
10
|
+
import { authStore } from '../stores/index.js';
|
|
11
|
+
import { tasksApi } from '../api/index.js';
|
|
12
|
+
import { localTaskService } from './LocalTaskService.js';
|
|
13
13
|
import { getLogger } from '@myassis/shared';
|
|
14
14
|
import { getPlatform } from '@myassis/shared/dist/utils/system.js';
|
|
15
15
|
// 当前网关平台标识
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
-
import { getSessionManager } from '../session/SessionManager';
|
|
2
|
+
import { getSessionManager } from '../session/SessionManager.js';
|
|
3
3
|
/**
|
|
4
4
|
* Agent - Business logic entity
|
|
5
5
|
* Represents an AI agent with independent system prompt and multiple sessions
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
-
import { Agent } from './Agent';
|
|
3
|
-
import { getSessionManager } from '../session/SessionManager';
|
|
4
|
-
import { authStore } from '../../stores/authStore';
|
|
2
|
+
import { Agent } from './Agent.js';
|
|
3
|
+
import { getSessionManager } from '../session/SessionManager.js';
|
|
4
|
+
import { authStore } from '../../stores/authStore.js';
|
|
5
5
|
import { getLogger } from '@myassis/shared';
|
|
6
|
-
import appConfig from '../../config';
|
|
6
|
+
import appConfig from '../../config/index.js';
|
|
7
7
|
const logger = getLogger('AgentManager');
|
|
8
8
|
/**
|
|
9
9
|
* AgentManager - Business logic layer
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* - /api/v1/data/* - 用户数据路由 (models, skills, tasks, settings)
|
|
8
8
|
* - /api/v1/skill-hubs/* - 技能库路由
|
|
9
9
|
*/
|
|
10
|
-
import { authApi, skillsApi, skillHubApi, modelsApi, settingsApi } from '../api';
|
|
11
|
-
import { authStore, memoryStore, persistStore } from '../stores';
|
|
12
|
-
import { taskService } from './TaskService';
|
|
10
|
+
import { authApi, skillsApi, skillHubApi, modelsApi, settingsApi } from '../api/index.js';
|
|
11
|
+
import { authStore, memoryStore, persistStore } from '../stores/index.js';
|
|
12
|
+
import { taskService } from './TaskService.js';
|
|
13
13
|
import { getLogger } from '@myassis/shared';
|
|
14
14
|
const logger = getLogger('DataService');
|
|
15
15
|
// ============ 认证服务 ============
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getLogger } from '@myassis/shared';
|
|
2
2
|
const logger = getLogger('MemoryManager');
|
|
3
|
-
import { toModel } from '../models';
|
|
4
|
-
import { modelsService } from '../dataService';
|
|
5
|
-
import { authStore } from '../../stores';
|
|
6
|
-
import { LLMClient } from '../llm/LLMClient';
|
|
7
|
-
import { appConfig } from '../../config';
|
|
3
|
+
import { toModel } from '../models.js';
|
|
4
|
+
import { modelsService } from '../dataService.js';
|
|
5
|
+
import { authStore } from '../../stores/index.js';
|
|
6
|
+
import { LLMClient } from '../llm/LLMClient.js';
|
|
7
|
+
import { appConfig } from '../../config/index.js';
|
|
8
8
|
const DEFAULT_CONFIG = {
|
|
9
9
|
summaryThreshold: 10,
|
|
10
10
|
enabled: true,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
2
|
import { getLogger } from '@myassis/shared';
|
|
3
|
-
import { SessionStore } from './SessionStore';
|
|
4
|
-
import { AgentStore } from '../../services/agent/AgentStore';
|
|
5
|
-
import { authStore } from '../../stores/authStore';
|
|
6
|
-
import { toModel } from '../../services/models';
|
|
7
|
-
import { executeTool, getToolDefinitions } from '../../services/tools';
|
|
8
|
-
import { getSystemPromptAsync } from '../systemPrompt';
|
|
9
|
-
import { LLMClient, parseAruments } from '../llm/LLMClient';
|
|
10
|
-
import { modelsService, settingsService } from '../../services/dataService';
|
|
11
|
-
import { MemoryManager } from '../memory/MemoryManager';
|
|
12
|
-
import { appConfig } from '../../config';
|
|
13
|
-
import { getSessionManager } from './SessionManager';
|
|
3
|
+
import { SessionStore } from './SessionStore.js';
|
|
4
|
+
import { AgentStore } from '../../services/agent/AgentStore.js';
|
|
5
|
+
import { authStore } from '../../stores/authStore.js';
|
|
6
|
+
import { toModel } from '../../services/models.js';
|
|
7
|
+
import { executeTool, getToolDefinitions } from '../../services/tools/index.js';
|
|
8
|
+
import { getSystemPromptAsync } from '../systemPrompt.js';
|
|
9
|
+
import { LLMClient, parseAruments } from '../llm/LLMClient.js';
|
|
10
|
+
import { modelsService, settingsService } from '../../services/dataService.js';
|
|
11
|
+
import { MemoryManager } from '../memory/MemoryManager.js';
|
|
12
|
+
import { appConfig } from '../../config/index.js';
|
|
13
|
+
import { getSessionManager } from './SessionManager.js';
|
|
14
14
|
const logger = getLogger('Session');
|
|
15
15
|
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
16
16
|
// AgentStore 单例 - 需要通过 SessionStore 获取数据库实例
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
2
|
import { getLogger } from '@myassis/shared';
|
|
3
3
|
const logger = getLogger('SessionManager');
|
|
4
|
-
import { sessionStore } from './SessionStore';
|
|
5
|
-
import { authStore } from '../../stores/authStore';
|
|
6
|
-
import { Session } from './Session';
|
|
4
|
+
import { sessionStore } from './SessionStore.js';
|
|
5
|
+
import { authStore } from '../../stores/authStore.js';
|
|
6
|
+
import { Session } from './Session.js';
|
|
7
7
|
/**
|
|
8
8
|
* SessionManager - Business logic layer
|
|
9
9
|
* Manages sessions in memory
|
|
@@ -2,7 +2,7 @@ import Database from 'better-sqlite3';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import { getLogger } from '@myassis/shared';
|
|
5
|
-
import { MigrationManager } from './MigrationManager';
|
|
5
|
+
import { MigrationManager } from './MigrationManager.js';
|
|
6
6
|
const logger = getLogger('SessionStore');
|
|
7
7
|
/**
|
|
8
8
|
* SessionStore - Data access layer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { authStore } from '../stores';
|
|
1
|
+
import { authStore } from '../stores/index.js';
|
|
2
2
|
import os from 'os';
|
|
3
|
-
import { settingsService, skillsService } from './dataService';
|
|
3
|
+
import { settingsService, skillsService } from './dataService.js';
|
|
4
4
|
import { getLogger } from '@myassis/shared';
|
|
5
5
|
const logger = getLogger('SystemPrompt');
|
|
6
6
|
// 预设的对话风格模板
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { getLogger } from '@myassis/shared';
|
|
6
6
|
const logger = getLogger('PushTokenStore');
|
|
7
|
-
import { sessionStore } from '../session/SessionStore';
|
|
7
|
+
import { sessionStore } from '../session/SessionStore.js';
|
|
8
8
|
export class PushTokenStore {
|
|
9
9
|
db;
|
|
10
10
|
constructor() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* 操作 SQLite 数据库,与 AgentStore/SessionStore 共享同一个数据库实例
|
|
4
4
|
*/
|
|
5
5
|
import { getLogger } from '@myassis/shared';
|
|
6
|
-
import { sessionStore } from '../session/SessionStore';
|
|
6
|
+
import { sessionStore } from '../session/SessionStore.js';
|
|
7
7
|
const logger = getLogger('TaskStore');
|
|
8
8
|
function rowToTaskData(row) {
|
|
9
9
|
return {
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* 工具定义集合
|
|
3
3
|
*/
|
|
4
4
|
export * from './types.js';
|
|
5
|
-
import { searchTool } from './search';
|
|
6
|
-
import { calculatorTool } from './calculator';
|
|
7
|
-
import { screenshotTool } from './screenshot';
|
|
8
|
-
import { keyboardTool } from './keyboard';
|
|
9
|
-
import { mouseTool } from './mouse';
|
|
10
|
-
import { fetchTool } from './fetch';
|
|
11
|
-
import { skillTool } from './skill';
|
|
12
|
-
import { execTool } from './exec';
|
|
13
|
-
import { fileTool } from './file';
|
|
14
|
-
import { taskTool } from './task';
|
|
15
|
-
import { modelTool } from './model';
|
|
16
|
-
import { editTool } from './edit';
|
|
17
|
-
import { webFetchTool } from './webFetch';
|
|
18
|
-
import { sessionsSpawnTool } from './sessionsSpawn';
|
|
5
|
+
import { searchTool } from './search.js';
|
|
6
|
+
import { calculatorTool } from './calculator.js';
|
|
7
|
+
import { screenshotTool } from './screenshot.js';
|
|
8
|
+
import { keyboardTool } from './keyboard.js';
|
|
9
|
+
import { mouseTool } from './mouse.js';
|
|
10
|
+
import { fetchTool } from './fetch.js';
|
|
11
|
+
import { skillTool } from './skill.js';
|
|
12
|
+
import { execTool } from './exec.js';
|
|
13
|
+
import { fileTool } from './file.js';
|
|
14
|
+
import { taskTool } from './task.js';
|
|
15
|
+
import { modelTool } from './model.js';
|
|
16
|
+
import { editTool } from './edit.js';
|
|
17
|
+
import { webFetchTool } from './webFetch.js';
|
|
18
|
+
import { sessionsSpawnTool } from './sessionsSpawn.js';
|
|
19
19
|
export const tools = [
|
|
20
20
|
searchTool, calculatorTool, screenshotTool, keyboardTool, mouseTool,
|
|
21
21
|
skillTool, execTool, taskTool, modelTool, fetchTool,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { modelsService } from '../dataService';
|
|
2
|
-
import { authStore } from '../../stores';
|
|
1
|
+
import { modelsService } from '../dataService.js';
|
|
2
|
+
import { authStore } from '../../stores/index.js';
|
|
3
3
|
export const modelTool = {
|
|
4
4
|
name: 'model',
|
|
5
5
|
description: '模型管理工具',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
2
|
import { getLogger } from '@myassis/shared';
|
|
3
|
-
import { getSessionManager } from '../session';
|
|
3
|
+
import { getSessionManager } from '../session/index.js';
|
|
4
4
|
const logger = getLogger('sessionsSpawn');
|
|
5
5
|
export const sessionsSpawnTool = {
|
|
6
6
|
name: 'sessions_spawn',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { skillsService, skillHubService } from '../dataService';
|
|
2
|
-
import { authStore, persistStore } from '../../stores';
|
|
1
|
+
import { skillsService, skillHubService } from '../dataService.js';
|
|
2
|
+
import { authStore, persistStore } from '../../stores/index.js';
|
|
3
3
|
import { getLogger } from '@myassis/shared';
|
|
4
4
|
const logger = getLogger('skill');
|
|
5
5
|
export const skillTool = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myassis/gateway",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dev": "tsx watch src/index.ts",
|
|
25
25
|
"start": "node dist/index.js",
|
|
26
26
|
"build": "tsc --skipLibCheck",
|
|
27
|
-
"postbuild": "node scripts/add-shebang.js && npx tsc-alias",
|
|
27
|
+
"postbuild": "node scripts/add-shebang.js && node scripts/fix-esm-imports.js && npx tsc-alias",
|
|
28
28
|
"pkg:win": "pkg . --targets node18-win-x64 --output myassis-gateway-win.exe",
|
|
29
29
|
"pkg:linux": "pkg . --targets node18-linux-x64 --output myassis-gateway-linux",
|
|
30
30
|
"pkg:all": "npm run pkg:win && npm run pkg:linux",
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { promisify } from 'util';
|
|
6
|
+
import { readdir, readFile, writeFile, stat } from 'fs/promises';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
// 匹配相对导入的正则:import ... from './xxx' 或 import ... from '../xxx'
|
|
12
|
+
const relativeImportRegex = /from\s+['"](\.\/[^'"]*|\\.\\.\/[^'"]*)['"]/g;
|
|
13
|
+
const dynamicImportRegex = /import\s*\(\s*['"](\.\/[^'"]*|\\.\\.\/[^'"]*)['"]\s*\)/g;
|
|
14
|
+
|
|
15
|
+
async function addJsExtensionToImports(filePath) {
|
|
16
|
+
let content = await readFile(filePath, 'utf8');
|
|
17
|
+
let modified = false;
|
|
18
|
+
|
|
19
|
+
// 替换静态导入 - 匹配各种相对路径
|
|
20
|
+
content = content.replace(/from\s+['"]([^'"\n]+)['"]/g, (match, importPath) => {
|
|
21
|
+
// 如果是 node_modules 或绝对路径,跳过
|
|
22
|
+
if (importPath.startsWith('@myassis/') || importPath.startsWith('/')) {
|
|
23
|
+
return match;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 如果已经有扩展名,跳过
|
|
27
|
+
if (importPath.endsWith('.js') || importPath.endsWith('.json') || importPath.endsWith('.ts') || importPath.endsWith('.cjs') || importPath.endsWith('.mjs')) {
|
|
28
|
+
return match;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 只处理相对路径 (./ 或 ../)
|
|
32
|
+
if (importPath.startsWith('.') || importPath.startsWith('..')) {
|
|
33
|
+
modified = true;
|
|
34
|
+
return `from '${importPath}.js'`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return match;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// 替换动态导入
|
|
41
|
+
content = content.replace(dynamicImportRegex, (match, importPath) => {
|
|
42
|
+
if (importPath.endsWith('.js') || importPath.endsWith('.json') || importPath.endsWith('.ts')) {
|
|
43
|
+
return match;
|
|
44
|
+
}
|
|
45
|
+
modified = true;
|
|
46
|
+
return `import('${importPath}.js')`;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (modified) {
|
|
50
|
+
await writeFile(filePath, content, 'utf8');
|
|
51
|
+
console.log(`✅ Fixed imports in: ${path.relative(__dirname + '/..', filePath)}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function processDirectory(dirPath) {
|
|
56
|
+
const entries = await readdir(dirPath);
|
|
57
|
+
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const fullPath = path.join(dirPath, entry);
|
|
60
|
+
const stats = await stat(fullPath);
|
|
61
|
+
|
|
62
|
+
if (stats.isDirectory()) {
|
|
63
|
+
await processDirectory(fullPath);
|
|
64
|
+
} else if (entry.endsWith('.js')) {
|
|
65
|
+
await addJsExtensionToImports(fullPath);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function main() {
|
|
71
|
+
const distPath = path.join(__dirname, '..', 'dist');
|
|
72
|
+
|
|
73
|
+
if (!fs.existsSync(distPath)) {
|
|
74
|
+
console.error('❌ dist directory not found!');
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.log('🔧 Adding .js extensions to relative imports...');
|
|
79
|
+
await processDirectory(distPath);
|
|
80
|
+
console.log('✅ Done!');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
main().catch(console.error);
|