@hile/cli 1.0.23 → 1.1.0
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/README.md +1 -1
- package/dist/start.js +7 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ HILE_RUNTIME_DIR=./custom hile start
|
|
|
104
104
|
import { defineService, loadService } from '@hile/core'
|
|
105
105
|
import { configService } from './services/config'
|
|
106
106
|
|
|
107
|
-
export default defineService(async (shutdown) => {
|
|
107
|
+
export default defineService('http', async (shutdown) => {
|
|
108
108
|
const config = await loadService(configService)
|
|
109
109
|
const pool = await createPool(config.dbUrl)
|
|
110
110
|
shutdown(() => pool.end())
|
package/dist/start.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { registerExitHook } from './exitHook.js';
|
|
2
2
|
import { glob } from 'glob';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { container, isService, loadService } from '@hile/core';
|
|
4
|
+
import { container, formatServiceKey, isService, loadService } from '@hile/core';
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
6
|
import { pathToFileURL } from 'node:url';
|
|
7
7
|
const require = createRequire(import.meta.url);
|
|
@@ -29,23 +29,23 @@ function logContainerEvent(event) {
|
|
|
29
29
|
const dim = (s) => (colorize ? `${c.dim}${s}${c.reset}` : s);
|
|
30
30
|
switch (event.type) {
|
|
31
31
|
case 'service:init':
|
|
32
|
-
console.info(`${tag} ${target(`service
|
|
32
|
+
console.info(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${dim('init')}`);
|
|
33
33
|
break;
|
|
34
34
|
case 'service:ready':
|
|
35
|
-
console.info(`${tag} ${target(`service
|
|
35
|
+
console.info(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${ok('ready')} ${dim(`(${event.durationMs}ms)`)}`);
|
|
36
36
|
break;
|
|
37
37
|
case 'service:error':
|
|
38
|
-
console.error(`${tag} ${target(`service
|
|
38
|
+
console.error(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${err('failed')} ${dim(`(${event.durationMs}ms)`)}`);
|
|
39
39
|
console.error(event.error);
|
|
40
40
|
break;
|
|
41
41
|
case 'service:shutdown:start':
|
|
42
|
-
console.info(`${tag} ${target(`service
|
|
42
|
+
console.info(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${warn('stopping')}`);
|
|
43
43
|
break;
|
|
44
44
|
case 'service:shutdown:done':
|
|
45
|
-
console.info(`${tag} ${target(`service
|
|
45
|
+
console.info(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${dim('stopped')} ${dim(`(${event.durationMs}ms)`)}`);
|
|
46
46
|
break;
|
|
47
47
|
case 'service:shutdown:error':
|
|
48
|
-
console.error(`${tag} ${target(`service
|
|
48
|
+
console.error(`${tag} ${target(`service(${formatServiceKey(event.key)})`)} ${err('shutdown error')}`);
|
|
49
49
|
console.error(event.error);
|
|
50
50
|
break;
|
|
51
51
|
case 'container:shutdown:start':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hile/cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"vitest": "^4.0.18"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@hile/core": "^1.0
|
|
28
|
+
"@hile/core": "^1.1.0",
|
|
29
29
|
"async-exit-hook": "^2.0.1",
|
|
30
30
|
"commander": "^14.0.3",
|
|
31
31
|
"glob": "^13.0.6",
|
|
32
32
|
"tsx": "^4.21.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ec49eb8979b6c9c3ce99cb5311f1684bcde1bf2a"
|
|
35
35
|
}
|