@travetto/registry 5.0.0-rc.0 → 5.0.0-rc.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/registry",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.1",
|
|
4
4
|
"description": "Patterns and utilities for handling registration of metadata and functionality for run-time use",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast-transformations",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"directory": "module/registry"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/base": "^5.0.0-rc.
|
|
30
|
+
"@travetto/base": "^5.0.0-rc.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@travetto/cli": "^5.0.0-rc.
|
|
33
|
+
"@travetto/cli": "^5.0.0-rc.1",
|
|
34
34
|
"@travetto/transformer": "^5.0.0-rc.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ManifestModuleUtil, RuntimeIndex
|
|
2
|
-
import { watchCompiler,
|
|
1
|
+
import { ManifestModuleUtil, RuntimeIndex } from '@travetto/manifest';
|
|
2
|
+
import { watchCompiler, WatchEvent, RuntimeContext } from '@travetto/base';
|
|
3
3
|
|
|
4
4
|
interface ModuleLoader {
|
|
5
5
|
init?(): Promise<void>;
|
|
@@ -19,7 +19,7 @@ class $DynamicFileLoader {
|
|
|
19
19
|
#loader: ModuleLoader;
|
|
20
20
|
#initialized = false;
|
|
21
21
|
|
|
22
|
-
async dispatch(ev:
|
|
22
|
+
async dispatch(ev: WatchEvent): Promise<void> {
|
|
23
23
|
if (ev.action === 'update' || ev.action === 'delete') {
|
|
24
24
|
await this.#loader.unload(ev.output);
|
|
25
25
|
}
|
|
@@ -66,7 +66,7 @@ class $DynamicFileLoader {
|
|
|
66
66
|
|
|
67
67
|
// Fire off, and let it run in the bg. Restart on exit
|
|
68
68
|
(async (): Promise<void> => {
|
|
69
|
-
for await (const ev of watchCompiler
|
|
69
|
+
for await (const ev of watchCompiler({ restartOnExit: true })) {
|
|
70
70
|
if (ev.file && RuntimeIndex.hasModule(ev.module) && VALID_FILE_TYPES.has(ManifestModuleUtil.getFileType(ev.file))) {
|
|
71
71
|
await this.dispatch(ev);
|
|
72
72
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
2
|
|
|
3
|
-
import { FindConfig, RuntimeIndex } from '@travetto/manifest';
|
|
3
|
+
import { type FindConfig, RuntimeIndex } from '@travetto/manifest';
|
|
4
4
|
import { Class, Env } from '@travetto/base';
|
|
5
5
|
|
|
6
6
|
import { DynamicFileLoader } from '../internal/file-loader';
|