@reventlessdev/reventless-gwt 1.0.0-alpha.113 → 1.0.0-alpha.114

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,16 @@
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
+ # 1.0.0-alpha.114 (2026-07-14)
7
+
8
+ ### Bug Fixes
9
+
10
+ * show debug logs on the local platform (both launch paths) ([81837d7](https://github.com/ReventlessDev/reventless-core/commit/81837d7e02abe1065a722b43b195adef2c836794))
11
+ ### Features
12
+
13
+ * **core:** thread ~comp through Projection.handleAction for attributed action logging ([fa32d93](https://github.com/ReventlessDev/reventless-core/commit/fa32d93dedabea1b1f655f01a4ea769a5908b143))
14
+
15
+
6
16
  # 1.0.0-alpha.113 (2026-07-14)
7
17
 
8
18
  **Note:** Version bump only for package @reventlessdev/reventless-gwt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-gwt",
3
- "version": "1.0.0-alpha.113",
3
+ "version": "1.0.0-alpha.114",
4
4
  "description": "Given-When-Then DSLs and CLI runner for Reventless slice testing",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -20,10 +20,10 @@
20
20
  "chokidar": "^3.6.0",
21
21
  "picocolors": "^1.1.1",
22
22
  "sury": "11.0.0-alpha.4",
23
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.27",
24
+ "@reventlessdev/reventless-core": "3.0.0-alpha.168",
23
25
  "@reventlessdev/rescript-jest": "1.0.0-alpha.7",
24
- "@reventlessdev/reventless-core": "3.0.0-alpha.167",
25
26
  "@reventlessdev/reventless-domain-protocol": "1.0.0-alpha.20",
26
- "@reventlessdev/rescript-effect": "0.1.0-alpha.27",
27
27
  "@reventlessdev/reventless-infra": "3.0.0-alpha.99",
28
28
  "@reventlessdev/reventless-spec": "3.0.0-alpha.76"
29
29
  },
@@ -45,9 +45,9 @@ function Make(Projection) {
45
45
  let deleteSubState = (store, id, subId, getSubId) => {
46
46
  store[id] = Stdlib_Option.getOr(Stdlib_Option.map(store[id], states => states.filter(state => Primitive_object.notequal(getSubId(state), subId))), []);
47
47
  };
48
+ let handleActions = (actions, operations) => Projection$ReventlessCore.handleActions(undefined, actions, operations, Projection.subIdConfig);
48
49
  let update = async (store, events$p) => {
49
- let actions = events$p.map(event$p => Projection.project(event$p));
50
- await Projection$ReventlessCore.handleActions(actions, {
50
+ await handleActions(events$p.map(event$p => Projection.project(event$p)), {
51
51
  load: extra => Promise.resolve({
52
52
  TAG: "Ok",
53
53
  _0: states(store, extra)
@@ -163,7 +163,7 @@ function Make(Projection) {
163
163
  _0: undefined
164
164
  });
165
165
  }
166
- }, Projection.subIdConfig);
166
+ });
167
167
  if (Projection.subIdConfig !== undefined) {
168
168
  return Stdlib_Dict.mapValues(store, states => states.toSorted((state1, state2) => Primitive_string.compare(getSubId(state1), getSubId(state2))));
169
169
  } else {
@@ -11,6 +11,8 @@
11
11
 
12
12
  let tapSentinel = "@@RVLESS_EVT@@ "
13
13
 
14
+ @val external _envLogLevel: option<string> = "process.env.LOG_LEVEL"
15
+
14
16
  type lineClass =
15
17
  | Domain(JSON.t) // a tap line; the parsed `{event:"domainEvent",…}` payload
16
18
  | Ready // the Domain GraphQL server's "listening on …" line
@@ -110,6 +112,18 @@ let run = async (
110
112
  let pPort = ports->Array.getUnsafe(1)
111
113
  let dMcp = ports->Array.getUnsafe(2)
112
114
  let pMcp = ports->Array.getUnsafe(3)
115
+ // The gwt bin defaults LOG_LEVEL=silent so its OWN stdout stays pure NDJSON;
116
+ // the platform child is a separate process whose stdout we parse, so it needs
117
+ // real logs — the "listening on" line drives readiness and the rest becomes
118
+ // platformLog. Default it to the local platform's own verbosity (debug — same
119
+ // as `pnpm run serve`, which relies on reventless-local's Debug default), so
120
+ // projection/action debug lines surface in the runner log. An explicit
121
+ // LOG_LEVEL the developer set (anything but the bin's silent default) is
122
+ // honored, so `LOG_LEVEL=info` still quietens it.
123
+ let childLogLevel = switch _envLogLevel {
124
+ | Some(l) if l != "silent" && l != "" => l
125
+ | _ => "debug"
126
+ }
113
127
  let env = Dict.fromArray([
114
128
  ("REVENTLESS_EVENT_TAP", "ndjson"),
115
129
  ("REVENTLESS_LOCAL_BACKEND", backend),
@@ -118,11 +132,7 @@ let run = async (
118
132
  ("REVENTLESS_DOMAIN_MCP_PORT", Int.toString(dMcp)),
119
133
  ("REVENTLESS_PLATFORM_MCP_PORT", Int.toString(pMcp)),
120
134
  ("NODE_OPTIONS", "--disable-warning=ExperimentalWarning"),
121
- // The gwt bin defaults LOG_LEVEL=silent so its OWN stdout stays pure NDJSON;
122
- // the platform child is a separate process whose stdout we parse, so it needs
123
- // real logs — the "listening on" line drives readiness and the rest becomes
124
- // platformLog. Override the inherited silent.
125
- ("LOG_LEVEL", "info"),
135
+ ("LOG_LEVEL", childLogLevel),
126
136
  // The child's stdout is a pipe (we line-parse it), so the framework's sink
127
137
  // detection would auto-pick JSON (non-TTY). But every consumer of `onLog`
128
138
  // renders ANSI — the CLI forwards to the developer's terminal, the extension
@@ -80,6 +80,8 @@ async function run(roots, backend, fixedPortsOpt, callbacks) {
80
80
  let pPort = ports[1];
81
81
  let dMcp = ports[2];
82
82
  let pMcp = ports[3];
83
+ let l = process.env.LOG_LEVEL;
84
+ let childLogLevel = l !== undefined && l !== "silent" && l !== "" ? l : "debug";
83
85
  let env = Object.fromEntries([
84
86
  [
85
87
  "REVENTLESS_EVENT_TAP",
@@ -111,7 +113,7 @@ async function run(roots, backend, fixedPortsOpt, callbacks) {
111
113
  ],
112
114
  [
113
115
  "LOG_LEVEL",
114
- "info"
116
+ childLogLevel
115
117
  ],
116
118
  [
117
119
  "REVENTLESS_LOG_FORMAT",
@@ -59,9 +59,10 @@ function Make(Spec) {
59
59
  let deleteSubState = (store, id, subId, getSubId) => {
60
60
  store[id] = Stdlib_Option.getOr(Stdlib_Option.map(store[id], states => states.filter(state => Primitive_object.notequal(getSubId(state), subId))), []);
61
61
  };
62
+ let runActions = (actions, operations) => Projection$ReventlessCore.handleActions(undefined, actions, operations, Spec.subIdConfig);
62
63
  let update = async (store, events) => {
63
64
  let actions = events.map(ev => Projection.project(ev)).flat();
64
- await Projection$ReventlessCore.handleActions(actions, {
65
+ await runActions(actions, {
65
66
  load: extra => Promise.resolve({
66
67
  TAG: "Ok",
67
68
  _0: states(store, extra)
@@ -177,7 +178,7 @@ function Make(Spec) {
177
178
  _0: undefined
178
179
  });
179
180
  }
180
- }, Spec.subIdConfig);
181
+ });
181
182
  if (Spec.subIdConfig !== undefined) {
182
183
  return Stdlib_Dict.mapValues(store, states => states.toSorted((s1, s2) => Primitive_string.compare(getSubId(s1), getSubId(s2))));
183
184
  } else {