@reventlessdev/reventless-spec 3.0.0-alpha.168 → 3.0.0-alpha.169

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,14 @@
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.169 (2026-10-19)
7
+
8
+ ### Features
9
+
10
+ * **gwt:** record behaviour scenarios as they run, for suites whose source names none ([256b253](https://github.com/ReventlessDev/reventless-core/commit/256b253153ec043105c38ac742a1a3efbde48c87))
11
+ * **spec,aws,local:** tell the host shell which environment it runs in, and write local host UI files into a chosen assetsDir ([4f896d1](https://github.com/ReventlessDev/reventless-core/commit/4f896d13ae9ec0d211c33dbd9271e7197cfebc41))
12
+
13
+
6
14
  # 3.0.0-alpha.168 (2026-10-17)
7
15
 
8
16
  **Note:** Version bump only for package @reventlessdev/reventless-spec
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-spec",
3
- "version": "3.0.0-alpha.168",
3
+ "version": "3.0.0-alpha.169",
4
4
  "description": "Specifications for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -0,0 +1,39 @@
1
+ /***
2
+ Which environment a host shell runs in, as `config.json` tells it: the name, and
3
+ the purpose when it is known. The shell badges everything that is not
4
+ `production`, so an unknown purpose shows rather than hides.
5
+
6
+ One answer for every caller, from the two the deploy already gives: a declared
7
+ environment ([DeploymentProvenance]) and the stacks the platform treats as
8
+ production. Pure; the caller passes the stack and the list.
9
+ */
10
+
11
+ type t = {name: string, purpose: option<string>}
12
+
13
+ let nameKey = "environment"
14
+ let purposeKey = "environmentPurpose"
15
+
16
+ /** What the local platform says about itself. */
17
+ let local = {name: "local", purpose: Some("local")}
18
+
19
+ /**
20
+ The declared environment wins over the stack, its purpose over the stack list.
21
+ A stack in `prodStacks` with no declared purpose is `production`; any other is
22
+ unknown.
23
+ */
24
+ let resolve = (
25
+ ~provenance: DeploymentProvenance.t,
26
+ ~stack: string,
27
+ ~prodStacks: array<string>,
28
+ ): t => {
29
+ name: provenance.environment->Option.getOr(stack),
30
+ purpose: provenance.purpose->Option.orElse(
31
+ prodStacks->Array.includes(stack) ? Some(Environments.purposeName(Production)) : None,
32
+ ),
33
+ }
34
+
35
+ /** The `config.json` entries; no purpose key when the purpose is unknown. */
36
+ let configFields = (env: t): array<(string, JSON.t)> =>
37
+ [(nameKey, JSON.Encode.string(env.name))]->Array.concat(
38
+ env.purpose->Option.mapOr([], p => [(purposeKey, JSON.Encode.string(p))]),
39
+ )
@@ -0,0 +1,39 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
4
+ import * as Environments$Reventless from "./Environments.res.mjs";
5
+
6
+ let nameKey = "environment";
7
+
8
+ let purposeKey = "environmentPurpose";
9
+
10
+ function resolve(provenance, stack, prodStacks) {
11
+ return {
12
+ name: Stdlib_Option.getOr(provenance.environment, stack),
13
+ purpose: Stdlib_Option.orElse(provenance.purpose, prodStacks.includes(stack) ? Environments$Reventless.purposeName("Production") : undefined)
14
+ };
15
+ }
16
+
17
+ function configFields(env) {
18
+ return [[
19
+ nameKey,
20
+ env.name
21
+ ]].concat(Stdlib_Option.mapOr(env.purpose, [], p => [[
22
+ purposeKey,
23
+ p
24
+ ]]));
25
+ }
26
+
27
+ let local = {
28
+ name: "local",
29
+ purpose: "local"
30
+ };
31
+
32
+ export {
33
+ nameKey,
34
+ purposeKey,
35
+ local,
36
+ resolve,
37
+ configFields,
38
+ }
39
+ /* Environments-Reventless Not a pure module */