@hile/cli 1.1.16 → 1.1.17
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/start.js +4 -2
- package/package.json +2 -2
package/dist/start.js
CHANGED
|
@@ -68,7 +68,7 @@ export async function start(options) {
|
|
|
68
68
|
}
|
|
69
69
|
// 开发模式下,使用 tsx 运行
|
|
70
70
|
if (options.dev) {
|
|
71
|
-
await import('tsx/esm');
|
|
71
|
+
// await import('tsx/esm');
|
|
72
72
|
process.env.NODE_ENV = 'development';
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
@@ -105,7 +105,9 @@ export async function start(options) {
|
|
|
105
105
|
const _file = file.startsWith(AUTO_TAG)
|
|
106
106
|
? file.substring(AUTO_TAG.length)
|
|
107
107
|
: pathToFileURL(file).href;
|
|
108
|
-
const target =
|
|
108
|
+
const target = options.dev && _file.endsWith('.ts')
|
|
109
|
+
? await (await import('tsx/esm/api')).tsImport(_file, import.meta.url)
|
|
110
|
+
: await import(_file);
|
|
109
111
|
const fn = target?.default ?? target;
|
|
110
112
|
if (!fn || !isService(fn))
|
|
111
113
|
throw new Error(`invalid service file: ${file}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hile/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"tsx": "^4.21.0",
|
|
37
37
|
"yaml": "^2.9.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "f18e5f13cba4c2ae2aaa1d6c29990db0b62d0293"
|
|
40
40
|
}
|