@reventlessdev/reventless-gwt 1.0.0-alpha.100
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 +916 -0
- package/LICENSE +202 -0
- package/bin/reventless-dev.mjs +21 -0
- package/package.json +54 -0
- package/rescript.json +36 -0
- package/src/.gwtignore +10 -0
- package/src/Automation_GWT.res +207 -0
- package/src/Automation_GWT.res.mjs +160 -0
- package/src/Behavior_GWT.res +569 -0
- package/src/Behavior_GWT.res.mjs +523 -0
- package/src/Bind.res +29 -0
- package/src/Bind.res.mjs +22 -0
- package/src/BuildClassifier.res +147 -0
- package/src/BuildClassifier.res.mjs +136 -0
- package/src/Cancellation.res +37 -0
- package/src/Cancellation.res.mjs +46 -0
- package/src/ChildProcess.res +102 -0
- package/src/ChildProcess.res.mjs +107 -0
- package/src/Cli.res +905 -0
- package/src/Cli.res.mjs +952 -0
- package/src/Collector.res +212 -0
- package/src/Collector.res.mjs +218 -0
- package/src/ComponentMeta.res +77 -0
- package/src/ComponentMeta.res.mjs +91 -0
- package/src/ComponentScan.res +103 -0
- package/src/ComponentScan.res.mjs +105 -0
- package/src/Delegate_GWT.res +303 -0
- package/src/Delegate_GWT.res.mjs +372 -0
- package/src/Diff.res +91 -0
- package/src/Diff.res.mjs +98 -0
- package/src/Discovery.res +105 -0
- package/src/Discovery.res.mjs +99 -0
- package/src/DomainDeadCode.res +98 -0
- package/src/DomainDeadCode.res.mjs +72 -0
- package/src/DomainGraph.res +0 -0
- package/src/DomainGraph.res.mjs +0 -0
- package/src/EventMapping_GWT.res +29 -0
- package/src/EventMapping_GWT.res.mjs +44 -0
- package/src/Filter.res +45 -0
- package/src/Filter.res.mjs +47 -0
- package/src/Flow_GWT.res +664 -0
- package/src/Flow_GWT.res.mjs +604 -0
- package/src/FormatterHuman.res +109 -0
- package/src/FormatterHuman.res.mjs +115 -0
- package/src/FormatterJson.res +264 -0
- package/src/FormatterJson.res.mjs +322 -0
- package/src/FormatterJunit.res +93 -0
- package/src/FormatterJunit.res.mjs +90 -0
- package/src/FormatterTap.res +100 -0
- package/src/FormatterTap.res.mjs +131 -0
- package/src/FormatterVsCode.res +352 -0
- package/src/FormatterVsCode.res.mjs +546 -0
- package/src/Hint.res +119 -0
- package/src/Hint.res.mjs +124 -0
- package/src/InboundTranslation_GWT.res +83 -0
- package/src/InboundTranslation_GWT.res.mjs +94 -0
- package/src/JestBind.res +70 -0
- package/src/JestBind.res.mjs +63 -0
- package/src/Loader.res +24 -0
- package/src/Loader.res.mjs +23 -0
- package/src/LocalHost.res +119 -0
- package/src/LocalHost.res.mjs +99 -0
- package/src/Mapping_GWT.res +474 -0
- package/src/Mapping_GWT.res.mjs +322 -0
- package/src/MismatchRender.res +72 -0
- package/src/MismatchRender.res.mjs +127 -0
- package/src/MultiSourceProjection_GWT.res +316 -0
- package/src/MultiSourceProjection_GWT.res.mjs +354 -0
- package/src/OutboundTranslation_GWT.res +238 -0
- package/src/OutboundTranslation_GWT.res.mjs +186 -0
- package/src/Outcome.res +97 -0
- package/src/Outcome.res.mjs +93 -0
- package/src/PackageScan.res +80 -0
- package/src/PackageScan.res.mjs +81 -0
- package/src/PlatformRunner.res +181 -0
- package/src/PlatformRunner.res.mjs +176 -0
- package/src/PlatformScan.res +142 -0
- package/src/PlatformScan.res.mjs +132 -0
- package/src/ProcessManager.res +135 -0
- package/src/ProcessManager.res.mjs +119 -0
- package/src/Projection_GWT.res +312 -0
- package/src/Projection_GWT.res.mjs +332 -0
- package/src/Query_GWT.res +379 -0
- package/src/Query_GWT.res.mjs +367 -0
- package/src/RenderRescript.res +125 -0
- package/src/RenderRescript.res.mjs +141 -0
- package/src/RunWorker.res +24 -0
- package/src/RunWorker.res.mjs +16 -0
- package/src/RunnerTypes.res +68 -0
- package/src/RunnerTypes.res.mjs +60 -0
- package/src/SideEffect_GWT.res +157 -0
- package/src/SideEffect_GWT.res.mjs +113 -0
- package/src/StateChange/ExternalAddCategorySlice.res +25 -0
- package/src/StateChange/ExternalAddCategorySlice.res.mjs +34 -0
- package/src/StateChange/ExternalAddCategorySlice_Behavior.res +19 -0
- package/src/StateChange/ExternalAddCategorySlice_Behavior.res.mjs +46 -0
- package/src/StateChange/WithFixtures.res +22 -0
- package/src/StateChange/WithFixtures.res.mjs +31 -0
- package/src/StateChange/WithFixtures_Behavior.res +17 -0
- package/src/StateChange/WithFixtures_Behavior.res.mjs +37 -0
- package/src/StateChange/WithManualOpen.res +23 -0
- package/src/StateChange/WithManualOpen.res.mjs +31 -0
- package/src/StateChange/WithManualOpen_Behavior.res +17 -0
- package/src/StateChange/WithManualOpen_Behavior.res.mjs +37 -0
- package/src/StubRuntime.res +54 -0
- package/src/StubRuntime.res.mjs +55 -0
- package/src/TestFixtures.res +16 -0
- package/src/TestFixtures.res.mjs +34 -0
- package/src/Watch.res +108 -0
- package/src/Watch.res.mjs +85 -0
- package/src/WatcherProbe.res +56 -0
- package/src/WatcherProbe.res.mjs +59 -0
- package/src/Worker.res +24 -0
- package/src/Worker.res.mjs +9 -0
- package/tests/AutomationGwtTest.res +71 -0
- package/tests/AutomationGwtTest.res.mjs +189 -0
- package/tests/BuildClassifierTest.res +133 -0
- package/tests/BuildClassifierTest.res.mjs +176 -0
- package/tests/CliRunEntryTest.res +57 -0
- package/tests/CliRunEntryTest.res.mjs +65 -0
- package/tests/CliWatchScopeTest.res +62 -0
- package/tests/CliWatchScopeTest.res.mjs +95 -0
- package/tests/ComponentMetaTest.res +67 -0
- package/tests/ComponentMetaTest.res.mjs +71 -0
- package/tests/DelegateGwtTest.res +487 -0
- package/tests/DelegateGwtTest.res.mjs +891 -0
- package/tests/DiscoveryTest.res +42 -0
- package/tests/DiscoveryTest.res.mjs +43 -0
- package/tests/DomainDeadCodeTest.res +119 -0
- package/tests/DomainDeadCodeTest.res.mjs +158 -0
- package/tests/DomainGraphTest.res +448 -0
- package/tests/DomainGraphTest.res.mjs +505 -0
- package/tests/FlowAggregateGwtTest.res +171 -0
- package/tests/FlowAggregateGwtTest.res.mjs +273 -0
- package/tests/FlowCrossPluginGwtTest.res +340 -0
- package/tests/FlowCrossPluginGwtTest.res.mjs +798 -0
- package/tests/FlowGwtTest.res +222 -0
- package/tests/FlowGwtTest.res.mjs +433 -0
- package/tests/FormatterGoldenTest.res +125 -0
- package/tests/FormatterGoldenTest.res.mjs +162 -0
- package/tests/FormatterVsCodeMessageTest.res +41 -0
- package/tests/FormatterVsCodeMessageTest.res.mjs +42 -0
- package/tests/InboundTranslationGwtTest.res +34 -0
- package/tests/InboundTranslationGwtTest.res.mjs +99 -0
- package/tests/LocalHostIntegration.res +70 -0
- package/tests/LocalHostIntegration.res.mjs +64 -0
- package/tests/LocalHostTest.res +71 -0
- package/tests/LocalHostTest.res.mjs +63 -0
- package/tests/MappingGwtTest.res +350 -0
- package/tests/MappingGwtTest.res.mjs +596 -0
- package/tests/OutboundTranslationGwtTest.res +59 -0
- package/tests/OutboundTranslationGwtTest.res.mjs +139 -0
- package/tests/PlatformRunnerTest.res +66 -0
- package/tests/PlatformRunnerTest.res.mjs +85 -0
- package/tests/PlatformScanTest.res +61 -0
- package/tests/PlatformScanTest.res.mjs +56 -0
- package/tests/QueryGwtTest.res +161 -0
- package/tests/QueryGwtTest.res.mjs +314 -0
- package/tests/QueryResolverGwtTest.res +71 -0
- package/tests/QueryResolverGwtTest.res.mjs +136 -0
- package/tests/RunnerUnitTest.res +219 -0
- package/tests/RunnerUnitTest.res.mjs +244 -0
- package/tests/SideEffect/FakeOrderNotification.res +23 -0
- package/tests/SideEffect/FakeOrderNotification.res.mjs +36 -0
- package/tests/SideEffect/FakeOrderNotificationGwtTest.res +35 -0
- package/tests/SideEffect/FakeOrderNotificationGwtTest.res.mjs +73 -0
- package/tests/SideEffect/MockEmail.res +18 -0
- package/tests/SideEffect/MockEmail.res.mjs +47 -0
- package/tests/StateChange/ExternalAddCategorySlice_GWT.res +27 -0
- package/tests/StateChange/ExternalAddCategorySlice_GWT.res.mjs +70 -0
- package/tests/StateChange/WithFixtures_Fixtures.res +9 -0
- package/tests/StateChange/WithFixtures_Fixtures.res.mjs +20 -0
- package/tests/StateChange/WithFixtures_GWT.res +23 -0
- package/tests/StateChange/WithFixtures_GWT.res.mjs +56 -0
- package/tests/StateChange/WithManualOpen_Fixtures.res +7 -0
- package/tests/StateChange/WithManualOpen_Fixtures.res.mjs +20 -0
- package/tests/StateChange/WithManualOpen_GWT.res +17 -0
- package/tests/StateChange/WithManualOpen_GWT.res.mjs +56 -0
- package/tests/StateChangeSliceGwtTest.res +160 -0
- package/tests/StateChangeSliceGwtTest.res.mjs +280 -0
- package/tests/StateViewSliceGwtTest.res +64 -0
- package/tests/StateViewSliceGwtTest.res.mjs +161 -0
- package/tests/WatchDebounceTest.res +106 -0
- package/tests/WatchDebounceTest.res.mjs +128 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Watch$ReventlessGwt from "../src/Watch.res.mjs";
|
|
4
|
+
|
|
5
|
+
function delay(ms) {
|
|
6
|
+
return new Promise((resolve, _reject) => {
|
|
7
|
+
setTimeout(() => resolve(), ms);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
globalThis.describe("Watch.isStructuralSource", () => {
|
|
12
|
+
globalThis.test("an unlink of a .res source is structural", async () => {
|
|
13
|
+
globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Unlink", "/p/src/Foo/Bar.res")).toEqual(true);
|
|
14
|
+
});
|
|
15
|
+
globalThis.test("a generated .res.mjs unlink is NOT structural (ends in .mjs)", async () => {
|
|
16
|
+
globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Unlink", "/p/src/Foo/Bar.res.mjs")).toEqual(false);
|
|
17
|
+
});
|
|
18
|
+
globalThis.test("an add of a .res source is not structural (incremental handles it)", async () => {
|
|
19
|
+
globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Add", "/p/src/Foo/Bar.res")).toEqual(false);
|
|
20
|
+
});
|
|
21
|
+
globalThis.test("a change of a .res source is not structural", async () => {
|
|
22
|
+
globalThis.expect(Watch$ReventlessGwt.isStructuralSource("Change", "/p/src/Foo/Bar.res")).toEqual(false);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
globalThis.describe("Watch.debounce coalescing", () => {
|
|
27
|
+
globalThis.test("a burst collapses to one call carrying the strongest event", async () => {
|
|
28
|
+
let calls = {
|
|
29
|
+
contents: []
|
|
30
|
+
};
|
|
31
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
|
|
32
|
+
calls.contents = calls.contents.concat([[
|
|
33
|
+
e,
|
|
34
|
+
p
|
|
35
|
+
]]);
|
|
36
|
+
});
|
|
37
|
+
fire("Change", "/p/src/A.res");
|
|
38
|
+
fire("Add", "/p/src/new/A.res");
|
|
39
|
+
fire("Unlink", "/p/src/old/A.res");
|
|
40
|
+
await delay(120);
|
|
41
|
+
globalThis.expect(calls.contents.length).toEqual(1);
|
|
42
|
+
let match = calls.contents[0];
|
|
43
|
+
globalThis.expect(match[0]).toEqual("Unlink");
|
|
44
|
+
globalThis.expect(match[1]).toEqual("/p/src/old/A.res");
|
|
45
|
+
});
|
|
46
|
+
globalThis.test("a later weaker event does not mask an earlier unlink", async () => {
|
|
47
|
+
let calls = {
|
|
48
|
+
contents: []
|
|
49
|
+
};
|
|
50
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
|
|
51
|
+
calls.contents = calls.contents.concat([e]);
|
|
52
|
+
});
|
|
53
|
+
fire("Unlink", "/p/src/old/A.res");
|
|
54
|
+
fire("Change", "/p/src/A.res");
|
|
55
|
+
await delay(120);
|
|
56
|
+
globalThis.expect(calls.contents).toEqual(["Unlink"]);
|
|
57
|
+
});
|
|
58
|
+
globalThis.test("interleaved .res.mjs unlinks never surface; each distinct .res source does", async () => {
|
|
59
|
+
let calls = {
|
|
60
|
+
contents: []
|
|
61
|
+
};
|
|
62
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
|
|
63
|
+
calls.contents = calls.contents.concat([[
|
|
64
|
+
e,
|
|
65
|
+
p
|
|
66
|
+
]]);
|
|
67
|
+
});
|
|
68
|
+
fire("Unlink", "/p/src/old/A.res");
|
|
69
|
+
fire("Unlink", "/p/src/old/A.res.mjs");
|
|
70
|
+
fire("Unlink", "/p/src/old/A_Behavior.res");
|
|
71
|
+
fire("Unlink", "/p/src/old/A_Behavior.res.mjs");
|
|
72
|
+
fire("Add", "/p/src/new/A.res");
|
|
73
|
+
fire("Add", "/p/src/new/A.res.mjs");
|
|
74
|
+
await delay(120);
|
|
75
|
+
let paths = calls.contents.map(param => param[1]);
|
|
76
|
+
globalThis.expect(calls.contents.every(param => Watch$ReventlessGwt.isStructuralSource(param[0], param[1]))).toEqual(true);
|
|
77
|
+
globalThis.expect(paths.includes("/p/src/old/A.res")).toEqual(true);
|
|
78
|
+
globalThis.expect(paths.includes("/p/src/old/A_Behavior.res")).toEqual(true);
|
|
79
|
+
globalThis.expect(paths.some(p => p.endsWith(".mjs"))).toEqual(false);
|
|
80
|
+
globalThis.expect(calls.contents.length).toEqual(2);
|
|
81
|
+
});
|
|
82
|
+
globalThis.test("a burst spanning two packages emits an unlink per package (A4.1)", async () => {
|
|
83
|
+
let calls = {
|
|
84
|
+
contents: []
|
|
85
|
+
};
|
|
86
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, p) => {
|
|
87
|
+
calls.contents = calls.contents.concat([[
|
|
88
|
+
e,
|
|
89
|
+
p
|
|
90
|
+
]]);
|
|
91
|
+
});
|
|
92
|
+
fire("Unlink", "/pkgA/src/Foo.res");
|
|
93
|
+
fire("Unlink", "/pkgB/src/Bar.res");
|
|
94
|
+
await delay(120);
|
|
95
|
+
let paths = calls.contents.map(param => param[1]);
|
|
96
|
+
globalThis.expect(paths.includes("/pkgA/src/Foo.res")).toEqual(true);
|
|
97
|
+
globalThis.expect(paths.includes("/pkgB/src/Bar.res")).toEqual(true);
|
|
98
|
+
globalThis.expect(calls.contents.length).toEqual(2);
|
|
99
|
+
});
|
|
100
|
+
globalThis.test("a structural signal suppresses a co-occurring plain change", async () => {
|
|
101
|
+
let calls = {
|
|
102
|
+
contents: []
|
|
103
|
+
};
|
|
104
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
|
|
105
|
+
calls.contents = calls.contents.concat([e]);
|
|
106
|
+
});
|
|
107
|
+
fire("Change", "/p/src/Edited.res");
|
|
108
|
+
fire("Unlink", "/p/src/old/Moved.res");
|
|
109
|
+
await delay(120);
|
|
110
|
+
globalThis.expect(calls.contents).toEqual(["Unlink"]);
|
|
111
|
+
});
|
|
112
|
+
globalThis.test("a lone change stays a change (incremental re-run)", async () => {
|
|
113
|
+
let calls = {
|
|
114
|
+
contents: []
|
|
115
|
+
};
|
|
116
|
+
let fire = Watch$ReventlessGwt.debounce(40, (e, _p) => {
|
|
117
|
+
calls.contents = calls.contents.concat([e]);
|
|
118
|
+
});
|
|
119
|
+
fire("Change", "/p/src/A.res");
|
|
120
|
+
await delay(120);
|
|
121
|
+
globalThis.expect(calls.contents).toEqual(["Change"]);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
delay,
|
|
127
|
+
}
|
|
128
|
+
/* Not a pure module */
|