@reventlessdev/reventless-core 3.0.0-alpha.170 → 3.0.0-alpha.172

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +14 -14
  3. package/src/components/ExtensionPoint/ExtensionPoint_Builder.res +5 -2
  4. package/src/components/ExtensionPoint/ExtensionPoint_Builder.res.mjs +3 -3
  5. package/src/components/Heartbeat/Heartbeat.res +2 -2
  6. package/src/components/Heartbeat/Heartbeat_Builder.res +2 -2
  7. package/src/components/Heartbeat/Heartbeat_Builder.res.mjs +2 -4
  8. package/src/components/Task/Task_Builder.res +6 -4
  9. package/src/components/Task/Task_Builder.res.mjs +4 -4
  10. package/src/plugin/component/Plugin_Builder.res +5 -1
  11. package/src/plugin/component/Plugin_Builder.res.mjs +1 -1
  12. package/src/plugin/component/Plugin_Helpers.res +6 -1
  13. package/src/plugin/connect/PluginExtensionPoint_Builder.res +2 -0
  14. package/src/plugin/connect/PluginExtensionPoint_Builder.res.mjs +3 -3
  15. package/src/plugin/connect/PluginExtensionPoint_Plugin.res +12 -5
  16. package/src/plugin/connect/PluginExtensionPoint_Plugin.res.mjs +8 -2
  17. package/tests/plugin/HeartbeatDisconnectGraceTest.res +98 -0
  18. package/tests/IdentityTest.res.mjs +0 -174
  19. package/tests/adapter/MonitoringTest.res.mjs +0 -82
  20. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +0 -356
  21. package/tests/admin/Platform_UIFragmentsApiTest.res.mjs +0 -101
  22. package/tests/aggregate/AggregateCacheTest.res.mjs +0 -433
  23. package/tests/aggregate/AggregateCallbackTest.res.mjs +0 -143
  24. package/tests/aggregate/AggregateCausationTest.res.mjs +0 -47
  25. package/tests/aggregate/AggregateConflictTest.res.mjs +0 -386
  26. package/tests/aggregate/AggregateFixtures.res.mjs +0 -308
  27. package/tests/aggregate/AggregateRejectionTest.res.mjs +0 -166
  28. package/tests/aggregate/AggregateSnapshotTest.res.mjs +0 -645
  29. package/tests/api/ApiNoApiTest.res.mjs +0 -90
  30. package/tests/api/GraphQL_StitcherTest.res.mjs +0 -112
  31. package/tests/api/SimpleTest.res.mjs +0 -10
  32. package/tests/api/SuryToJsonSchemaTest.res.mjs +0 -674
  33. package/tests/commandgenerator/CommandGeneratorCallbackTest.res.mjs +0 -160
  34. package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +0 -197
  35. package/tests/commandtopic/CommandTopicCallbackFixtures.res.mjs +0 -152
  36. package/tests/commandtopic/CommandTopicCallbackTest.res.mjs +0 -106
  37. package/tests/commandtopic/CommandTopicHelpersRejectionTest.res.mjs +0 -109
  38. package/tests/counter/CounterCallbackTest.res.mjs +0 -140
  39. package/tests/counter/CounterFixtures.res.mjs +0 -67
  40. package/tests/dcb/DcbDecodeTest.res.mjs +0 -194
  41. package/tests/dcb/DcbEventLogOperationsTest.res.mjs +0 -268
  42. package/tests/dcb/DcbFixtures.res.mjs +0 -534
  43. package/tests/dcb/DcbScopeInferenceTest.res.mjs +0 -480
  44. package/tests/dcb/DcbStateChangeSliceTest.res.mjs +0 -540
  45. package/tests/dcb/DcbTagTest.res.mjs +0 -867
  46. package/tests/dcb/DcbValidationTest.res.mjs +0 -476
  47. package/tests/eventlog/EventLogFixtures.res.mjs +0 -196
  48. package/tests/eventlog/EventLogOperationsTest.res.mjs +0 -192
  49. package/tests/eventlog/EventLogRetryTest.res.mjs +0 -195
  50. package/tests/eventmapper/EventMapperCallbackTest.res.mjs +0 -141
  51. package/tests/eventmapper/EventMapperFixtures.res.mjs +0 -440
  52. package/tests/eventmapper/EventMapperTest.res.mjs +0 -83
  53. package/tests/eventtopic/EventTopicFixtures.res.mjs +0 -65
  54. package/tests/eventtopic/EventTopicOperationsTest.res.mjs +0 -71
  55. package/tests/extensionpoint/ExtensionPointCallbackTest.res.mjs +0 -94
  56. package/tests/extensionpoint/ExtensionPointFixtures.res.mjs +0 -205
  57. package/tests/extensionpoint/ExtensionPointOperationsTest.res.mjs +0 -304
  58. package/tests/ftp/FTPTest.res.mjs +0 -88
  59. package/tests/logger/LogFormatTest.res.mjs +0 -309
  60. package/tests/logger/LoggerLazyTest.res.mjs +0 -40
  61. package/tests/message/MessageTest.res.mjs +0 -218
  62. package/tests/message/MetaEnvelopeTest.res.mjs +0 -188
  63. package/tests/plugin/ManifestVisibilityTest.res.mjs +0 -215
  64. package/tests/plugin/PluginSpecExperiment.res.mjs +0 -31
  65. package/tests/plugin/PluginStructureTest.res.mjs +0 -419
  66. package/tests/plugin/PluginVersionTest.res.mjs +0 -30
  67. package/tests/plugin/SchemaWalkerTest.res.mjs +0 -160
  68. package/tests/plugin/StateChangeSlice/PsPlaceOrder.res.mjs +0 -62
  69. package/tests/plugin/StateChangeSlice/PsShipOrder.res.mjs +0 -69
  70. package/tests/plugin/StateViewSlice/PsAnnotatedView.res.mjs +0 -95
  71. package/tests/plugin/StateViewSlice/PsAvailableProductsView.res.mjs +0 -69
  72. package/tests/plugin/StateViewSlice/PsCustomersView.res.mjs +0 -69
  73. package/tests/plugin/StateViewSlice/PsOrdersView.res.mjs +0 -81
  74. package/tests/poc/StructuralSubtypingPoc.res.mjs +0 -61
  75. package/tests/projection/ProjectionOptimizeTest.res.mjs +0 -75
  76. package/tests/querydb/QueryDbFixtures.res.mjs +0 -135
  77. package/tests/querydb/QueryDbOperationsTest.res.mjs +0 -168
  78. package/tests/sideeffecthandler/SideEffectHandlerCallbackTest.res.mjs +0 -77
  79. package/tests/sideeffecthandler/SideEffectHandlerFixtures.res.mjs +0 -139
  80. package/tests/util/CommandPublisherTest.res.mjs +0 -78
  81. package/tests/util/CsvStreamTest.res.mjs +0 -51
  82. package/tests/util/LruTest.res.mjs +0 -105
  83. package/tests/util/MetricsTest.res.mjs +0 -53
@@ -1,90 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
- import * as S from "sury/src/S.res.mjs";
4
- import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
5
- import * as Api$ReventlessInfra from "@reventlessdev/reventless-infra/src/components/Api.res.mjs";
6
- import * as ApiNoApiHelpers$ReventlessCore from "../../src/components/Api/ApiNoApiHelpers.res.mjs";
7
-
8
- globalThis.describe("ApiNoApiHelpers:", () => {
9
- globalThis.test("isNoApi returns false for schema without noApi metadata", () => {
10
- globalThis.expect(ApiNoApiHelpers$ReventlessCore.isNoApi(S.string)).toBe(false);
11
- });
12
- globalThis.test("isNoApi returns true for schema with noApi metadata set to true", () => {
13
- let schema$p = S.Metadata.set(S.string, Api$ReventlessInfra.noApiId, true);
14
- globalThis.expect(ApiNoApiHelpers$ReventlessCore.isNoApi(schema$p)).toBe(true);
15
- });
16
- globalThis.test("getExcludedVariants returns None for schema without noApiVariants metadata", () => {
17
- globalThis.expect(ApiNoApiHelpers$ReventlessCore.getExcludedVariants(S.string)).toBe(undefined);
18
- });
19
- globalThis.test("getExcludedVariants returns Some with DeleteItem when set", () => {
20
- let excluded = new Set([
21
- "DeleteItem",
22
- "UpdateItem"
23
- ]);
24
- let schema$p = S.Metadata.set(S.string, Api$ReventlessInfra.noApiVariantsId, excluded);
25
- let result = ApiNoApiHelpers$ReventlessCore.getExcludedVariants(schema$p);
26
- globalThis.expect(Stdlib_Option.getOr(Stdlib_Option.map(result, set => set.has("DeleteItem")), false)).toBe(true);
27
- });
28
- globalThis.test("filterNoApiVariants returns all field names when no variants are excluded", () => {
29
- let fieldNames = [
30
- "CreateItem",
31
- "DeleteItem",
32
- "UpdateItem"
33
- ];
34
- let filtered = ApiNoApiHelpers$ReventlessCore.filterNoApiVariants(fieldNames, S.string);
35
- globalThis.expect(filtered).toEqual([
36
- "CreateItem",
37
- "DeleteItem",
38
- "UpdateItem"
39
- ]);
40
- });
41
- globalThis.test("filterNoApiVariants filters out excluded variants", () => {
42
- let excluded = new Set(["DeleteItem"]);
43
- let schema$p = S.Metadata.set(S.string, Api$ReventlessInfra.noApiVariantsId, excluded);
44
- let fieldNames = [
45
- "CreateItem",
46
- "DeleteItem",
47
- "UpdateItem"
48
- ];
49
- let filtered = ApiNoApiHelpers$ReventlessCore.filterNoApiVariants(fieldNames, schema$p);
50
- globalThis.expect(filtered).toEqual([
51
- "CreateItem",
52
- "UpdateItem"
53
- ]);
54
- });
55
- globalThis.test("filterNoApiVariants filters out multiple excluded variants", () => {
56
- let excluded = new Set([
57
- "DeleteItem",
58
- "UpdateItem"
59
- ]);
60
- let schema$p = S.Metadata.set(S.string, Api$ReventlessInfra.noApiVariantsId, excluded);
61
- let fieldNames = [
62
- "CreateItem",
63
- "DeleteItem",
64
- "UpdateItem",
65
- "GetItem"
66
- ];
67
- let filtered = ApiNoApiHelpers$ReventlessCore.filterNoApiVariants(fieldNames, schema$p);
68
- globalThis.expect(filtered).toEqual([
69
- "CreateItem",
70
- "GetItem"
71
- ]);
72
- });
73
- globalThis.test("filterNoApiVariants returns empty array when all variants are excluded", () => {
74
- let excluded = new Set([
75
- "CreateItem",
76
- "DeleteItem",
77
- "UpdateItem"
78
- ]);
79
- let schema$p = S.Metadata.set(S.string, Api$ReventlessInfra.noApiVariantsId, excluded);
80
- let fieldNames = [
81
- "CreateItem",
82
- "DeleteItem",
83
- "UpdateItem"
84
- ];
85
- let filtered = ApiNoApiHelpers$ReventlessCore.filterNoApiVariants(fieldNames, schema$p);
86
- globalThis.expect(filtered).toEqual([]);
87
- });
88
- });
89
-
90
- /* Not a pure module */
@@ -1,112 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
- import * as AdminApi$ReventlessCore from "../../src/admin/AdminApi.res.mjs";
4
- import * as GraphQL_Stitcher$ReventlessCore from "../../src/components/Api/GraphQL_Stitcher.res.mjs";
5
-
6
- globalThis.describe("GraphQL_Stitcher.subscriptionSources", () => {
7
- globalThis.test("encode/decode round-trips the subscription→mutation source mapping", () => {
8
- let fragment = GraphQL_Stitcher$ReventlessCore.encode({
9
- types: [],
10
- mutations: [` Catalog_AddProduct(input: AddInput): CommandResult`],
11
- queries: [],
12
- subscriptions: [` onCatalog_AddProduct(id: ID): CommandResult`],
13
- subscriptionSources: [{
14
- field: "onCatalog_AddProduct",
15
- mutations: ["Catalog_AddProduct"]
16
- }]
17
- });
18
- let parts = GraphQL_Stitcher$ReventlessCore.decode(fragment);
19
- globalThis.expect(parts.subscriptionSources).toEqual([{
20
- field: "onCatalog_AddProduct",
21
- mutations: ["Catalog_AddProduct"]
22
- }]);
23
- });
24
- globalThis.test("decode tolerates fragments encoded before the field existed", () => {
25
- globalThis.expect(GraphQL_Stitcher$ReventlessCore.decode({
26
- encoded: `{"types":[],"mutations":[],"queries":[],"subscriptions":[" onX(id: ID): CommandResult"]}`,
27
- protocol: "graphql"
28
- }).subscriptionSources).toEqual([]);
29
- });
30
- globalThis.test("collectSubscriptionSources unions across fragments, first wins per field", () => {
31
- let base = GraphQL_Stitcher$ReventlessCore.encode({
32
- types: [],
33
- mutations: [],
34
- queries: [],
35
- subscriptions: [` onUIFragmentChange: UIFragmentChangeEvent`],
36
- subscriptionSources: [{
37
- field: "onUIFragmentChange",
38
- mutations: ["Platform_UIFragmentRegistered"]
39
- }]
40
- });
41
- let pluginA = GraphQL_Stitcher$ReventlessCore.encode({
42
- types: [],
43
- mutations: [],
44
- queries: [],
45
- subscriptions: [` onA(id: ID): CommandResult`],
46
- subscriptionSources: [
47
- {
48
- field: "onA",
49
- mutations: ["A"]
50
- },
51
- {
52
- field: "onUIFragmentChange",
53
- mutations: ["Rogue_Mutation"]
54
- }
55
- ]
56
- });
57
- let collected = GraphQL_Stitcher$ReventlessCore.collectSubscriptionSources(base, [pluginA]);
58
- globalThis.expect(collected).toEqual([
59
- {
60
- field: "onUIFragmentChange",
61
- mutations: ["Platform_UIFragmentRegistered"]
62
- },
63
- {
64
- field: "onA",
65
- mutations: ["A"]
66
- }
67
- ]);
68
- });
69
- globalThis.test("core-emitted admin base fragment carries no provider directives", () => {
70
- let base = AdminApi$ReventlessCore.baseFragment(true);
71
- globalThis.expect(base.encoded.includes("@aws_subscribe")).toBe(false);
72
- globalThis.expect(base.encoded.includes("@aws_auth")).toBe(false);
73
- let parts = GraphQL_Stitcher$ReventlessCore.decode(base);
74
- let fields = parts.subscriptionSources.map(s => s.field);
75
- globalThis.expect(fields.includes("onUIFragmentChange")).toBe(true);
76
- globalThis.expect(fields.includes("onPluginStatusChange")).toBe(true);
77
- });
78
- });
79
-
80
- globalThis.describe("GraphQL_Stitcher.stitchStandalone", () => {
81
- let pluginFragment = GraphQL_Stitcher$ReventlessCore.encode({
82
- types: [
83
- `type Product implements Node {\n id: ID!\n name: String\n}`,
84
- `union CommandResult = CommandAccepted | CommandRejected | CommandPending`
85
- ],
86
- mutations: [` Catalog_AddProduct(input: AddInput): CommandResult`],
87
- queries: [` Catalog_products: [Product]`],
88
- subscriptions: [` onCatalog_AddProduct(id: ID): CommandResult`],
89
- subscriptionSources: [{
90
- field: "onCatalog_AddProduct",
91
- mutations: ["Catalog_AddProduct"]
92
- }]
93
- });
94
- globalThis.test("renders a self-contained subgraph document with relay base types", () => {
95
- let sdl = GraphQL_Stitcher$ReventlessCore.stitchStandalone(pluginFragment);
96
- globalThis.expect(sdl).toContain("interface Node {");
97
- globalThis.expect(sdl).toContain("type PageInfo {");
98
- globalThis.expect(sdl).toContain("type Product implements Node {");
99
- globalThis.expect(sdl).toContain("Catalog_AddProduct(input: AddInput): CommandResult");
100
- globalThis.expect(sdl).toContain("onCatalog_AddProduct(id: ID): CommandResult");
101
- });
102
- globalThis.test("omits the global node query (the canonical base document owns it)", () => {
103
- let sdl = GraphQL_Stitcher$ReventlessCore.stitchStandalone(pluginFragment);
104
- globalThis.expect(sdl.includes("node(id: ID!): Node")).toBe(false);
105
- });
106
- globalThis.test("stitch keeps injecting the global node query (whole-schema path unchanged)", () => {
107
- let sdl = GraphQL_Stitcher$ReventlessCore.stitch(pluginFragment, []);
108
- globalThis.expect(sdl).toContain("node(id: ID!): Node");
109
- });
110
- });
111
-
112
- /* Not a pure module */
@@ -1,10 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
-
4
- globalThis.describe("Basic test", () => {
5
- globalThis.test("1 + 1 = 2", () => {
6
- globalThis.expect(2).toBe(2);
7
- });
8
- });
9
-
10
- /* Not a pure module */