@gopowerteam/request-generate 0.1.23 → 0.1.24
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/bin/index.mts +4 -4
- package/package.json +1 -1
package/bin/index.mts
CHANGED
|
@@ -7,12 +7,12 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = path.dirname(__filename);
|
|
10
|
-
const RequestGenerate = await import(path.resolve(
|
|
10
|
+
const RequestGenerate = await import(`file://${path.resolve(
|
|
11
11
|
__dirname,
|
|
12
12
|
'..',
|
|
13
13
|
'dist',
|
|
14
14
|
'index.mjs'
|
|
15
|
-
))
|
|
15
|
+
)}`)
|
|
16
16
|
|
|
17
17
|
const params = program
|
|
18
18
|
.name('@gopowerteam/request-generate')
|
|
@@ -46,9 +46,9 @@ async function loadConfigFile(filePath) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
if (configFilePath.endsWith('js')) {
|
|
49
|
-
return import(path.resolve(process.cwd(), configFilePath))
|
|
49
|
+
return import(`file://${path.resolve(process.cwd(), configFilePath)}`)
|
|
50
50
|
} else if (configFilePath.endsWith('ts')) {
|
|
51
|
-
return import(path.resolve(process.cwd(), configFilePath))
|
|
51
|
+
return import(`file://${path.resolve(process.cwd(), configFilePath)}`)
|
|
52
52
|
} else {
|
|
53
53
|
throw new Error('无法找到RequestGenerate配置文件')
|
|
54
54
|
}
|