@reventlessdev/reventless-aws 3.0.0-alpha.288 → 3.0.0-alpha.291

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.
@@ -22,7 +22,7 @@ function get(out, key) {
22
22
 
23
23
  globalThis.describe("Util_ShellConfig.fields — viewModes", () => {
24
24
  globalThis.test("unset ⇒ no viewModes key and the computed set is untouched", () => {
25
- let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, undefined);
25
+ let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, undefined, undefined);
26
26
  globalThis.expect(Object.keys(out)).toEqual([
27
27
  "apiEndpoint",
28
28
  "region"
@@ -33,7 +33,7 @@ globalThis.describe("Util_ShellConfig.fields — viewModes", () => {
33
33
  let out = Util_ShellConfig$ReventlessAws.fields(computed, [{
34
34
  TAG: "Map",
35
35
  _0: {}
36
- }], undefined);
36
+ }], undefined, undefined);
37
37
  globalThis.expect(get(out, "viewModes")).toEqual(["map"]);
38
38
  globalThis.expect(Stdlib_Option.isNone(out["mapStyle"])).toBe(true);
39
39
  });
@@ -51,7 +51,7 @@ globalThis.describe("Util_ShellConfig.fields — viewModes", () => {
51
51
  layout: "dagre"
52
52
  }
53
53
  }
54
- ], undefined);
54
+ ], undefined, undefined);
55
55
  globalThis.expect(get(out, "viewModes")).toEqual([
56
56
  "map",
57
57
  "graph"
@@ -61,9 +61,55 @@ globalThis.describe("Util_ShellConfig.fields — viewModes", () => {
61
61
  });
62
62
  });
63
63
 
64
+ globalThis.describe("Util_ShellConfig.fields — bakedManifest", () => {
65
+ let bake = key => ({
66
+ components: [{
67
+ plugin: "Catalog",
68
+ views: ["Products"],
69
+ commands: []
70
+ }],
71
+ key: key
72
+ });
73
+ globalThis.test("unset ⇒ no manifestUrl, so every caller keeps the admin path", () => {
74
+ let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, undefined, undefined);
75
+ globalThis.expect(Stdlib_Option.isNone(out["manifestUrl"])).toBe(true);
76
+ });
77
+ globalThis.test("declared ⇒ the URL the deploy writes the file to", () => {
78
+ let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, bake(undefined), undefined);
79
+ globalThis.expect(get(out, "manifestUrl")).toEqual("/component-manifest.json");
80
+ });
81
+ globalThis.test("follows a renamed bake", () => {
82
+ let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, bake("storefront.json"), undefined);
83
+ globalThis.expect(get(out, "manifestUrl")).toEqual("/storefront.json");
84
+ });
85
+ globalThis.test("a shellConfig manifestUrl fails the deploy rather than redirecting it", () => {
86
+ let failure;
87
+ try {
88
+ Util_ShellConfig$ReventlessAws.fields(computed, undefined, bake(undefined), Object.fromEntries([[
89
+ "manifestUrl",
90
+ "/elsewhere.json"
91
+ ]]));
92
+ failure = undefined;
93
+ } catch (raw_message) {
94
+ let message = Primitive_exceptions.internalToException(raw_message);
95
+ if (message.RE_EXN_ID === "Failure") {
96
+ failure = message._1;
97
+ } else {
98
+ throw message;
99
+ }
100
+ }
101
+ if (failure !== undefined) {
102
+ globalThis.expect(failure.includes("manifestUrl")).toBe(true);
103
+ return;
104
+ } else {
105
+ return JestGlobals.fail("a shellConfig key redirecting the computed manifest must fail the deploy");
106
+ }
107
+ });
108
+ });
109
+
64
110
  globalThis.describe("Util_ShellConfig.fields — shellConfig passthrough", () => {
65
111
  globalThis.test("shell-owned keys land verbatim, under the computed ones", () => {
66
- let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, Object.fromEntries([
112
+ let out = Util_ShellConfig$ReventlessAws.fields(computed, undefined, undefined, Object.fromEntries([
67
113
  [
68
114
  "platformName",
69
115
  "Online Shop"
@@ -84,7 +130,7 @@ globalThis.describe("Util_ShellConfig.fields — shellConfig passthrough", () =>
84
130
  globalThis.test("a key the deploy computes fails the deploy, naming it", () => {
85
131
  let failure;
86
132
  try {
87
- Util_ShellConfig$ReventlessAws.fields(computed, undefined, Object.fromEntries([[
133
+ Util_ShellConfig$ReventlessAws.fields(computed, undefined, undefined, Object.fromEntries([[
88
134
  "apiEndpoint",
89
135
  "https://wrong.example/graphql"
90
136
  ]]));