@travetto/manifest 5.0.10 → 5.0.12
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 -29
- package/package.json +2 -2
- package/src/dependencies.ts +0 -1
package/README.md
CHANGED
|
@@ -32,33 +32,6 @@ Additionally, once the code has been compiled (or even bundled after that), the
|
|
|
32
32
|
## Manifest Delta
|
|
33
33
|
During the compilation process, it is helpful to know how the output content differs from the manifest, which is produced from the source input. The [ManifestDeltaUtil](https://github.com/travetto/travetto/tree/main/module/manifest/src/delta.ts#L23) provides the functionality for a given manifest, and will produce a stream of changes grouped by module. This is the primary input into the [Compiler](https://github.com/travetto/travetto/tree/main/module/compiler#readme "The compiler infrastructure for the Travetto framework")'s incremental behavior to know when a file has changed and needs to be recompiled.
|
|
34
34
|
|
|
35
|
-
## Class and Function Metadata
|
|
36
|
-
For the framework to work properly, metadata needs to be collected about files, classes and functions to uniquely identify them, with support for detecting changes during live reloads. To achieve this, every `class` is decorated with an additional field of `Ⲑid`. `Ⲑid` represents a computed id that is tied to the file/class combination.
|
|
37
|
-
|
|
38
|
-
`Ⲑid` is used heavily throughout the framework for determining which classes are owned by the framework, and being able to lookup associated data by the id.
|
|
39
|
-
|
|
40
|
-
**Code: Test Class**
|
|
41
|
-
```typescript
|
|
42
|
-
export class TestClass {
|
|
43
|
-
async doStuff(): Promise<void> { }
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**Code: Test Class Compiled**
|
|
48
|
-
```javascript
|
|
49
|
-
"use strict";
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.TestClass = void 0;
|
|
52
|
-
const tslib_1 = require("tslib");
|
|
53
|
-
const Ⲑ_function_1 = tslib_1.__importStar(require("@travetto/runtime/src/function.js"));
|
|
54
|
-
var ᚕm = ["@travetto/manifest", "doc/test-class.ts"];
|
|
55
|
-
class TestClass {
|
|
56
|
-
static Ⲑinit = Ⲑ_function_1.registerFunction(TestClass, ᚕm, { hash: 197152026, lines: [1, 3] }, { doStuff: { hash: 51337554, lines: [2, 2] } }, false, false);
|
|
57
|
-
async doStuff() { }
|
|
58
|
-
}
|
|
59
|
-
exports.TestClass = TestClass;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
35
|
## Module Indexing
|
|
63
36
|
Once the manifest is created, the application runtime can now read this manifest, which allows for influencing runtime behavior. The most common patterns include:
|
|
64
37
|
* Loading all source files
|
|
@@ -119,8 +92,7 @@ By default, all paths within the framework are assumed to be in a POSIX style, a
|
|
|
119
92
|
[ "README.md", "md", 1868155200000 ]
|
|
120
93
|
],
|
|
121
94
|
"doc": [
|
|
122
|
-
[ "DOC.tsx", "ts", 1868155200000, "doc" ]
|
|
123
|
-
[ "doc/test-class.ts", "ts", 1868155200000, "doc" ]
|
|
95
|
+
[ "DOC.tsx", "ts", 1868155200000, "doc" ]
|
|
124
96
|
],
|
|
125
97
|
"$index": [
|
|
126
98
|
[ "__index__.ts", "ts", 1868155200000 ]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/manifest",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.12",
|
|
4
4
|
"description": "Support for project indexing, manifesting, along with file watching",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"path",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/node": "^22.10.2"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
|
-
"url": "https://github.com/travetto/travetto.git",
|
|
32
|
+
"url": "git+https://github.com/travetto/travetto.git",
|
|
33
33
|
"directory": "module/manifest"
|
|
34
34
|
},
|
|
35
35
|
"travetto": {
|