@travetto/manifest 5.0.0-rc.2 → 5.0.0-rc.3
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 +3 -7
- package/package.json +1 -1
- package/src/file.ts +3 -2
package/README.md
CHANGED
|
@@ -50,17 +50,13 @@ export class TestClass {
|
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.TestClass = void 0;
|
|
52
52
|
const tslib_1 = require("tslib");
|
|
53
|
-
const Ⲑ_decorator_1 = tslib_1.__importStar(require("@travetto/registry/src/decorator.js"));
|
|
54
53
|
const Ⲑ_function_1 = tslib_1.__importStar(require("@travetto/runtime/src/function.js"));
|
|
55
54
|
var ᚕm = ["@travetto/manifest", "doc/test-class"];
|
|
56
|
-
|
|
57
|
-
static Ⲑinit = Ⲑ_function_1.
|
|
55
|
+
class TestClass {
|
|
56
|
+
static Ⲑinit = Ⲑ_function_1.registerFunction(TestClass, ᚕm, { hash: 197152026, lines: [1, 3] }, { doStuff: { hash: 51337554, lines: [2, 2] } }, false, false);
|
|
58
57
|
async doStuff() { }
|
|
59
|
-
}
|
|
58
|
+
}
|
|
60
59
|
exports.TestClass = TestClass;
|
|
61
|
-
exports.TestClass = TestClass = tslib_1.__decorate([
|
|
62
|
-
Ⲑ_decorator_1.Register()
|
|
63
|
-
], TestClass);
|
|
64
60
|
```
|
|
65
61
|
|
|
66
62
|
## Module Indexing
|
package/package.json
CHANGED
package/src/file.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
|
+
import os from 'node:os';
|
|
3
4
|
|
|
4
5
|
import { path } from './path';
|
|
5
6
|
|
|
@@ -8,9 +9,9 @@ export class ManifestFileUtil {
|
|
|
8
9
|
* Write file and copy over when ready
|
|
9
10
|
*/
|
|
10
11
|
static async bufferedFileWrite(file: string, content: string): Promise<void> {
|
|
11
|
-
const temp = path.resolve(
|
|
12
|
-
await fs.mkdir(path.dirname(file), { recursive: true });
|
|
12
|
+
const temp = path.resolve(os.tmpdir(), `${process.hrtime()[1]}.${path.basename(file)}`);
|
|
13
13
|
await fs.writeFile(temp, content, 'utf8');
|
|
14
|
+
await fs.mkdir(path.dirname(file), { recursive: true });
|
|
14
15
|
await fs.rename(temp, file);
|
|
15
16
|
}
|
|
16
17
|
|