td-web-cli 0.1.3 → 0.1.4
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.
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { input } from '@inquirer/prompts';
|
|
2
2
|
import XLSX from 'xlsx';
|
|
3
3
|
import fs from 'fs';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
4
5
|
import path from 'path';
|
|
5
6
|
import { getTimestamp, logger, loggerError, normalizeError, languageToolCheck, getLanguageTool, } from '../../../utils/index.js';
|
|
7
|
+
// 获取当前文件目录
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
6
10
|
/**
|
|
7
11
|
* 读取并解析配置文件
|
|
8
12
|
* @param configPath 配置文件路径
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { Command } from 'commander';
|
|
|
2
2
|
import { input } from '@inquirer/prompts';
|
|
3
3
|
import XLSX from 'xlsx';
|
|
4
4
|
import fs from 'fs';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
5
6
|
import path from 'path';
|
|
6
7
|
import {
|
|
7
8
|
getTimestamp,
|
|
@@ -13,6 +14,10 @@ import {
|
|
|
13
14
|
getLanguageTool,
|
|
14
15
|
} from '../../../utils/index.js';
|
|
15
16
|
|
|
17
|
+
// 获取当前文件目录
|
|
18
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
19
|
+
const __dirname = path.dirname(__filename);
|
|
20
|
+
|
|
16
21
|
type Row = (string | number | null | undefined)[];
|
|
17
22
|
|
|
18
23
|
/**
|