@reventlessdev/reventless-core 3.0.0-alpha.329 → 3.0.0-alpha.330
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.330 (2026-11-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **aws:** a line logged outside its invocation's fiber still names the plugin ([8e6f553](https://github.com/ReventlessDev/reventless-core/commit/8e6f553cc8ac2e439862bf1f3636ac86a4a22137))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 3.0.0-alpha.329 (2026-11-05)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.330",
|
|
4
4
|
"description": "Core package for Reventless framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"sury": "11.0.0",
|
|
30
30
|
"uuid": "^13.0.0",
|
|
31
|
+
"@reventlessdev/rescript-effect": "1.0.0-alpha.1",
|
|
31
32
|
"@reventlessdev/rescript-fast-csv": "2.0.0-alpha.26",
|
|
32
33
|
"@reventlessdev/rescript-hash-object": "1.2.0-alpha.15",
|
|
33
|
-
"@reventlessdev/rescript-jest": "1.0.0-alpha.13",
|
|
34
34
|
"@reventlessdev/rescript-node": "2.0.0-alpha.26",
|
|
35
|
-
"@reventlessdev/rescript-
|
|
35
|
+
"@reventlessdev/rescript-jest": "1.0.0-alpha.13",
|
|
36
36
|
"@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
|
|
37
|
-
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
38
37
|
"@reventlessdev/rescript-ssh2": "2.0.0-alpha.27",
|
|
38
|
+
"@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
|
|
39
39
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.223",
|
|
40
|
-
"@reventlessdev/reventless-
|
|
41
|
-
"@reventlessdev/reventless-
|
|
40
|
+
"@reventlessdev/reventless-interop": "3.0.0-alpha.42",
|
|
41
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.194"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rescript": "12.3.1",
|
|
@@ -46,7 +46,23 @@ let annotateInvocation = (
|
|
|
46
46
|
| Some(count) if count > 1 => eff->Effect.annotateLogs("retryCount", count->Int.toString)
|
|
47
47
|
| _ => eff
|
|
48
48
|
}
|
|
49
|
+
// A line run on a fiber of its own (`->Effect.runSync`) misses these annotations, and inside a
|
|
50
|
+
// Lambda the component→plugin registry is empty: it names its plugin from the ambient one,
|
|
51
|
+
// set for the invocation and restored after it.
|
|
52
|
+
let withAmbientPlugin = eff =>
|
|
53
|
+
switch resolvedPlugin {
|
|
54
|
+
| None => eff
|
|
55
|
+
| Some(p) =>
|
|
56
|
+
Effect.sync(() => {
|
|
57
|
+
let before = Reventless.LogPrefix.currentPluginName.contents
|
|
58
|
+
Reventless.LogPrefix.currentPluginName := Some(p)
|
|
59
|
+
before
|
|
60
|
+
})->Effect.flatMap(before =>
|
|
61
|
+
eff->Effect.ensuring(Effect.sync(() => Reventless.LogPrefix.currentPluginName := before))
|
|
62
|
+
)
|
|
63
|
+
}
|
|
49
64
|
effect
|
|
65
|
+
->withAmbientPlugin
|
|
50
66
|
->Effect.annotateLogs("correlationId", cid)
|
|
51
67
|
->annotateOpt("comp", comp)
|
|
52
68
|
->annotateOpt("causationId", causationId)
|
|
@@ -22,7 +22,20 @@ function annotateInvocation(effect, correlationId, causationId, comp, pluginName
|
|
|
22
22
|
return eff;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
let withAmbientPlugin = eff => {
|
|
26
|
+
if (resolvedPlugin !== undefined) {
|
|
27
|
+
return Effect.flatMap(Effect.sync(() => {
|
|
28
|
+
let before = LogPrefix$Reventless.currentPluginName.contents;
|
|
29
|
+
LogPrefix$Reventless.currentPluginName.contents = resolvedPlugin;
|
|
30
|
+
return before;
|
|
31
|
+
}), before => Effect.ensuring(eff, Effect.sync(() => {
|
|
32
|
+
LogPrefix$Reventless.currentPluginName.contents = before;
|
|
33
|
+
})));
|
|
34
|
+
} else {
|
|
35
|
+
return eff;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return Effect.provideService(annotateRetry(annotateOpt(annotateOpt(Effect.annotateLogs(withAmbientPlugin(effect), "correlationId", cid), "comp", comp), "causationId", causationId)), RequestContext$ReventlessCore.tag, RequestContext$ReventlessCore.make(cid, causationId, comp, resolvedPlugin, timestamp, retryCount, identity, claims));
|
|
26
39
|
}
|
|
27
40
|
|
|
28
41
|
function runEffect(correlationId, causationId, comp, pluginName, timestamp, retryCount, identity, claims, effect) {
|