querysub 0.2.0

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 (169) hide show
  1. package/.dependency-cruiser.js +304 -0
  2. package/.eslintrc.js +51 -0
  3. package/.github/copilot-instructions.md +1 -0
  4. package/.vscode/settings.json +25 -0
  5. package/bin/deploy.js +4 -0
  6. package/bin/function.js +4 -0
  7. package/bin/server.js +4 -0
  8. package/costsBenefits.txt +112 -0
  9. package/deploy.ts +3 -0
  10. package/inject.ts +1 -0
  11. package/package.json +60 -0
  12. package/prompts.txt +54 -0
  13. package/spec.txt +820 -0
  14. package/src/-a-archives/archiveCache.ts +913 -0
  15. package/src/-a-archives/archives.ts +148 -0
  16. package/src/-a-archives/archivesBackBlaze.ts +792 -0
  17. package/src/-a-archives/archivesDisk.ts +418 -0
  18. package/src/-a-archives/copyLocalToBackblaze.ts +24 -0
  19. package/src/-a-auth/certs.ts +517 -0
  20. package/src/-a-auth/der.ts +122 -0
  21. package/src/-a-auth/ed25519.ts +1015 -0
  22. package/src/-a-auth/node-forge-ed25519.d.ts +17 -0
  23. package/src/-b-authorities/dnsAuthority.ts +203 -0
  24. package/src/-b-authorities/emailAuthority.ts +57 -0
  25. package/src/-c-identity/IdentityController.ts +200 -0
  26. package/src/-d-trust/NetworkTrust2.ts +150 -0
  27. package/src/-e-certs/EdgeCertController.ts +288 -0
  28. package/src/-e-certs/certAuthority.ts +192 -0
  29. package/src/-f-node-discovery/NodeDiscovery.ts +543 -0
  30. package/src/-g-core-values/NodeCapabilities.ts +134 -0
  31. package/src/-g-core-values/oneTimeForward.ts +91 -0
  32. package/src/-h-path-value-serialize/PathValueSerializer.ts +769 -0
  33. package/src/-h-path-value-serialize/stringSerializer.ts +176 -0
  34. package/src/0-path-value-core/LoggingClient.tsx +24 -0
  35. package/src/0-path-value-core/NodePathAuthorities.ts +978 -0
  36. package/src/0-path-value-core/PathController.ts +1 -0
  37. package/src/0-path-value-core/PathValueCommitter.ts +565 -0
  38. package/src/0-path-value-core/PathValueController.ts +231 -0
  39. package/src/0-path-value-core/archiveLocks/ArchiveLocks.ts +154 -0
  40. package/src/0-path-value-core/archiveLocks/ArchiveLocks2.ts +820 -0
  41. package/src/0-path-value-core/archiveLocks/archiveSnapshots.ts +180 -0
  42. package/src/0-path-value-core/debugLogs.ts +90 -0
  43. package/src/0-path-value-core/pathValueArchives.ts +483 -0
  44. package/src/0-path-value-core/pathValueCore.ts +2217 -0
  45. package/src/1-path-client/RemoteWatcher.ts +558 -0
  46. package/src/1-path-client/pathValueClientWatcher.ts +702 -0
  47. package/src/2-proxy/PathValueProxyWatcher.ts +1857 -0
  48. package/src/2-proxy/archiveMoveHarness.ts +376 -0
  49. package/src/2-proxy/garbageCollection.ts +753 -0
  50. package/src/2-proxy/pathDatabaseProxyBase.ts +37 -0
  51. package/src/2-proxy/pathValueProxy.ts +139 -0
  52. package/src/2-proxy/schema2.ts +518 -0
  53. package/src/3-path-functions/PathFunctionHelpers.ts +129 -0
  54. package/src/3-path-functions/PathFunctionRunner.ts +619 -0
  55. package/src/3-path-functions/PathFunctionRunnerMain.ts +67 -0
  56. package/src/3-path-functions/deployBlock.ts +10 -0
  57. package/src/3-path-functions/deployCheck.ts +7 -0
  58. package/src/3-path-functions/deployMain.ts +160 -0
  59. package/src/3-path-functions/pathFunctionLoader.ts +282 -0
  60. package/src/3-path-functions/syncSchema.ts +475 -0
  61. package/src/3-path-functions/tests/functionsTest.ts +135 -0
  62. package/src/3-path-functions/tests/rejectTest.ts +77 -0
  63. package/src/4-dom/css.tsx +29 -0
  64. package/src/4-dom/cssTypes.d.ts +212 -0
  65. package/src/4-dom/qreact.tsx +2322 -0
  66. package/src/4-dom/qreactTest.tsx +417 -0
  67. package/src/4-querysub/Querysub.ts +877 -0
  68. package/src/4-querysub/QuerysubController.ts +620 -0
  69. package/src/4-querysub/copyEvent.ts +0 -0
  70. package/src/4-querysub/permissions.ts +289 -0
  71. package/src/4-querysub/permissionsShared.ts +1 -0
  72. package/src/4-querysub/querysubPrediction.ts +525 -0
  73. package/src/5-diagnostics/FullscreenModal.tsx +67 -0
  74. package/src/5-diagnostics/GenericFormat.tsx +165 -0
  75. package/src/5-diagnostics/Modal.tsx +79 -0
  76. package/src/5-diagnostics/Table.tsx +183 -0
  77. package/src/5-diagnostics/TimeGrouper.tsx +114 -0
  78. package/src/5-diagnostics/diskValueAudit.ts +216 -0
  79. package/src/5-diagnostics/memoryValueAudit.ts +442 -0
  80. package/src/5-diagnostics/nodeMetadata.ts +135 -0
  81. package/src/5-diagnostics/qreactDebug.tsx +309 -0
  82. package/src/5-diagnostics/shared.ts +26 -0
  83. package/src/5-diagnostics/synchronousLagTracking.ts +47 -0
  84. package/src/TestController.ts +35 -0
  85. package/src/allowclient.flag +0 -0
  86. package/src/bits.ts +86 -0
  87. package/src/buffers.ts +69 -0
  88. package/src/config.ts +53 -0
  89. package/src/config2.ts +48 -0
  90. package/src/diagnostics/ActionsHistory.ts +56 -0
  91. package/src/diagnostics/NodeViewer.tsx +503 -0
  92. package/src/diagnostics/SizeLimiter.ts +62 -0
  93. package/src/diagnostics/TimeDebug.tsx +18 -0
  94. package/src/diagnostics/benchmark.ts +139 -0
  95. package/src/diagnostics/errorLogs/ErrorLogController.ts +515 -0
  96. package/src/diagnostics/errorLogs/ErrorLogCore.ts +274 -0
  97. package/src/diagnostics/errorLogs/LogClassifiers.tsx +302 -0
  98. package/src/diagnostics/errorLogs/LogFilterUI.tsx +84 -0
  99. package/src/diagnostics/errorLogs/LogNotify.tsx +101 -0
  100. package/src/diagnostics/errorLogs/LogTimeSelector.tsx +724 -0
  101. package/src/diagnostics/errorLogs/LogViewer.tsx +757 -0
  102. package/src/diagnostics/errorLogs/hookErrors.ts +60 -0
  103. package/src/diagnostics/errorLogs/logFiltering.tsx +149 -0
  104. package/src/diagnostics/heapTag.ts +13 -0
  105. package/src/diagnostics/listenOnDebugger.ts +77 -0
  106. package/src/diagnostics/logs/DiskLoggerPage.tsx +572 -0
  107. package/src/diagnostics/logs/ObjectDisplay.tsx +165 -0
  108. package/src/diagnostics/logs/ansiFormat.ts +108 -0
  109. package/src/diagnostics/logs/diskLogGlobalContext.ts +38 -0
  110. package/src/diagnostics/logs/diskLogger.ts +305 -0
  111. package/src/diagnostics/logs/diskShimConsoleLogs.ts +32 -0
  112. package/src/diagnostics/logs/injectFileLocationToConsole.ts +50 -0
  113. package/src/diagnostics/logs/logGitHashes.ts +30 -0
  114. package/src/diagnostics/managementPages.tsx +289 -0
  115. package/src/diagnostics/periodic.ts +89 -0
  116. package/src/diagnostics/runSaturationTest.ts +416 -0
  117. package/src/diagnostics/satSchema.ts +64 -0
  118. package/src/diagnostics/trackResources.ts +82 -0
  119. package/src/diagnostics/watchdog.ts +55 -0
  120. package/src/errors.ts +132 -0
  121. package/src/forceProduction.ts +3 -0
  122. package/src/fs.ts +72 -0
  123. package/src/heapDumps.ts +666 -0
  124. package/src/https.ts +2 -0
  125. package/src/inject.ts +1 -0
  126. package/src/library-components/ATag.tsx +84 -0
  127. package/src/library-components/Button.tsx +344 -0
  128. package/src/library-components/ButtonSelector.tsx +64 -0
  129. package/src/library-components/DropdownCustom.tsx +151 -0
  130. package/src/library-components/DropdownSelector.tsx +32 -0
  131. package/src/library-components/Input.tsx +334 -0
  132. package/src/library-components/InputLabel.tsx +198 -0
  133. package/src/library-components/InputPicker.tsx +125 -0
  134. package/src/library-components/LazyComponent.tsx +62 -0
  135. package/src/library-components/MeasureHeightCSS.tsx +48 -0
  136. package/src/library-components/MeasuredDiv.tsx +47 -0
  137. package/src/library-components/ShowMore.tsx +51 -0
  138. package/src/library-components/SyncedController.ts +171 -0
  139. package/src/library-components/TimeRangeSelector.tsx +407 -0
  140. package/src/library-components/URLParam.ts +263 -0
  141. package/src/library-components/colors.tsx +14 -0
  142. package/src/library-components/drag.ts +114 -0
  143. package/src/library-components/icons.tsx +692 -0
  144. package/src/library-components/niceStringify.ts +50 -0
  145. package/src/library-components/renderToString.ts +52 -0
  146. package/src/misc/PromiseRace.ts +101 -0
  147. package/src/misc/color.ts +30 -0
  148. package/src/misc/getParentProcessId.cs +53 -0
  149. package/src/misc/getParentProcessId.ts +53 -0
  150. package/src/misc/hash.ts +83 -0
  151. package/src/misc/ipPong.js +13 -0
  152. package/src/misc/networking.ts +2 -0
  153. package/src/misc/random.ts +45 -0
  154. package/src/misc.ts +19 -0
  155. package/src/noserverhotreload.flag +0 -0
  156. package/src/path.ts +226 -0
  157. package/src/persistentLocalStore.ts +37 -0
  158. package/src/promise.ts +15 -0
  159. package/src/server.ts +73 -0
  160. package/src/src.d.ts +1 -0
  161. package/src/test/heapProcess.ts +36 -0
  162. package/src/test/mongoSatTest.tsx +55 -0
  163. package/src/test/satTest.ts +193 -0
  164. package/src/test/test.tsx +552 -0
  165. package/src/zip.ts +92 -0
  166. package/src/zipThreaded.ts +106 -0
  167. package/src/zipThreadedWorker.js +19 -0
  168. package/tsconfig.json +27 -0
  169. package/yarnSpec.txt +56 -0
@@ -0,0 +1,417 @@
1
+ import { disableMeasurements, measureBlock, measureCode, measureFnc } from "socket-function/src/profiling/measure";
2
+ disableMeasurements();
3
+
4
+ import preact from "preact";
5
+ import { isNode, list, timeInHour } from "socket-function/src/misc";
6
+ import { ClientWatcher, clientWatcher } from "../1-path-client/pathValueClientWatcher";
7
+ import { isDeploy } from "../3-path-functions/deployCheck";
8
+ import { logErrors } from "../errors";
9
+ import { watchFilesAndTriggerHotReloading } from "socket-function/hot/HotReloadController";
10
+ import { qreact } from "./qreact";
11
+ import { Querysub } from "../4-querysub/QuerysubController";
12
+ import { PermissionsCheck } from "../4-querysub/permissions";
13
+ import { PathValueProxyWatcher, proxyWatcher } from "../2-proxy/PathValueProxyWatcher";
14
+ import { setFlag } from "socket-function/require/compileFlags";
15
+ import { rawSchema } from "../2-proxy/pathDatabaseProxyBase";
16
+ import { LOCAL_DOMAIN } from "../0-path-value-core/PathController";
17
+ import { batchFunction, delay } from "socket-function/src/batching";
18
+ import { formatTime } from "socket-function/src/formatting/format";
19
+ import { pathValueAuthority2 } from "../0-path-value-core/NodePathAuthorities";
20
+ import { schema } from "../3-path-functions/tests/rejectTest";
21
+ import { pathValueSerializer } from "../-h-path-value-serialize/PathValueSerializer";
22
+ import { getPathFromStr } from "../path";
23
+ import { PromiseObj } from "../promise";
24
+ import { css } from "./css";
25
+
26
+
27
+
28
+ async function main() {
29
+ if (!isNode()) return;
30
+ if (isDeploy()) return;
31
+ if (module.hotreload) return;
32
+ const edgePort = 15060;
33
+ PermissionsCheck.DEBUG = true;
34
+ ClientWatcher.DEBUG_READS = true;
35
+ ClientWatcher.DEBUG_WRITES = true;
36
+ //debugCoreMode();
37
+
38
+ //SocketFunction.silent = false;
39
+ Error.stackTraceLimit = 20;
40
+
41
+ await Querysub.hostServer({
42
+ trustedDomains: ["querysub.com"],
43
+ port: edgePort,
44
+ rootPath: __dirname + "/../../",
45
+ clientsideEntryPoint: "./src/4-dom/qreactTest.tsx",
46
+ hotReload: true,
47
+ });
48
+ }
49
+
50
+ class Nested extends qreact.Component<{
51
+ value: unknown;
52
+ }> {
53
+ render() {
54
+ return (
55
+ <>
56
+ value = {this.props.value}, {this.props.value}
57
+ <div>
58
+ {String(this.props.value)}
59
+ </div>
60
+ </>
61
+ );
62
+ }
63
+ }
64
+
65
+ class DynamicComponent extends qreact.Component<{
66
+ propValue: unknown;
67
+ }> {
68
+ state = {
69
+ value: "state",
70
+ noRoot: false,
71
+ children: {} as {
72
+ [num: number | string]: {
73
+ value: string;
74
+ }
75
+ },
76
+ nextChild: 0,
77
+ };
78
+ render() {
79
+ let base = <>
80
+ <div>Prop value {this.props.propValue}</div>
81
+ <div>State value <input value={this.state.value} onChange={e => this.state.value = e.currentTarget.value} /> = {this.state.value}</div>
82
+ <div>
83
+ No div root <input type="checkbox" checked={this.state.noRoot} onChange={e => this.state.noRoot = e.currentTarget.checked} />
84
+ </div>
85
+ <div>
86
+ <div>Children</div>
87
+ <button onClick={() => {
88
+ let nextChild = this.state.nextChild++;
89
+ this.state.children[nextChild] = { value: "prop" + nextChild, };
90
+ }}>
91
+ Add child
92
+ </button>
93
+ {Object.entries(this.state.children).map(([key, obj]) =>
94
+ <div class={css.marginLeft(10).hsla(200, 75, 75, 0.2)}>
95
+ <button onClick={() => delete this.state.children[key]}>Remove child</button>
96
+ <div>
97
+ Child prop: <input value={obj.value} onChange={e => obj.value = e.currentTarget.value} />
98
+ </div>
99
+ <DynamicComponent propValue={obj.value} />
100
+ </div>
101
+ )}
102
+ </div>
103
+ </>;
104
+ if (!this.state.noRoot) {
105
+ base = <div class={css.pad(10).hsla(160, 75, 75, 0.5)}>{base}</div>;
106
+ }
107
+ return base;
108
+ }
109
+ }
110
+
111
+ class ValueRender extends qreact.Component<{
112
+ x: { value: number };
113
+ }> {
114
+ render() {
115
+ return (
116
+ <div>
117
+ x = {this.props.x.value}
118
+ <button onClick={() => this.props.x.value++}>Test</button>
119
+ <input type="number" value={this.props.x.value} onInput={e => this.props.x.value = e.currentTarget.valueAsNumber} />
120
+ </div>
121
+ );
122
+ }
123
+ }
124
+
125
+ class Intermediate extends qreact.Component<{
126
+ x: { value: number };
127
+ }> {
128
+ render() {
129
+ return (
130
+ <ValueRender x={this.props.x} />
131
+ );
132
+ }
133
+ }
134
+
135
+ class CircleComponent extends qreact.Component {
136
+ render() {
137
+ return (
138
+ <circle cx={200} cy={50} r={50} fill="red" />
139
+ );
140
+ }
141
+ }
142
+
143
+ class Test extends qreact.Component {
144
+ state = {
145
+ valueValue: { value: 0 },
146
+ };
147
+ render() {
148
+ return (
149
+ <div>
150
+ <button onClick={() => this.state.valueValue.value++}>Increment</button>
151
+ <div>Value = {this.state.valueValue.value}</div>
152
+ <Intermediate x={{ value: this.state.valueValue.value }} />
153
+
154
+ <svg>
155
+ <circle cx={100} cy={100} r={50} fill="red" />
156
+ <CircleComponent />
157
+ </svg>
158
+ </div>
159
+ );
160
+ }
161
+ }
162
+
163
+ class Benchmark1 extends qreact.Component<{
164
+ count: number;
165
+ }> {
166
+ render() {
167
+ return (
168
+ <div>
169
+ {list(this.props.count).map(i => <div>{i}</div>)}
170
+ </div>
171
+ );
172
+ }
173
+ }
174
+ class Benchmark2 extends qreact.Component<{
175
+ count: number;
176
+ }> {
177
+ render() {
178
+ return (
179
+ list(this.props.count).map(i => <div>{i}</div>)
180
+ );
181
+ }
182
+ }
183
+
184
+
185
+ class SmallNested extends qreact.Component<{
186
+ obj: { value: number };
187
+ }> {
188
+ render() {
189
+ return (
190
+ <div />
191
+ );
192
+ }
193
+ }
194
+ class Benchmark3 extends qreact.Component<{
195
+ count: number;
196
+ }> {
197
+ render() {
198
+ return (
199
+ list(this.props.count).map(i => <SmallNested obj={{ value: i }} />)
200
+ );
201
+ }
202
+ }
203
+
204
+ class SmallNested2 extends qreact.Component<{
205
+ obj: { value: number };
206
+ }> {
207
+ render() {
208
+ return (
209
+ <div class={css.flex.gap(10).wrap} onClick={() => this.props.obj.value++}>
210
+ {this.props.obj.value}
211
+ <img src="/widgets/HTML5Video/video-thumbnail.jpg" />
212
+ </div>
213
+ );
214
+ }
215
+ }
216
+ class Benchmark3p5 extends qreact.Component<{
217
+ count: number;
218
+ }> {
219
+ render() {
220
+ return (
221
+ list(this.props.count).map(i => <SmallNested2 obj={{ value: i }} />)
222
+ );
223
+ }
224
+ }
225
+
226
+ class Benchmark4 extends qreact.Component<{
227
+ count: number;
228
+ }> {
229
+ render() {
230
+ return (
231
+ <div class={css.flex.wrap}>
232
+ {list(this.props.count).map(i =>
233
+ <img src="/widgets/HTML5Video/video-thumbnail.jpg" />
234
+ )}
235
+ </div>
236
+ );
237
+ }
238
+ }
239
+
240
+
241
+
242
+ async function browserMain() {
243
+ if (isNode()) return;
244
+ watchFilesAndTriggerHotReloading();
245
+
246
+ // NOTE: Annoying, but qreact can't emulate the special minified keys preact uses
247
+ qreact.createElement = preact.createElement as any;
248
+ qreact.Fragment = preact.Fragment as any;
249
+
250
+
251
+ //ClientWatcher.DEBUG_READS = true;
252
+ //ClientWatcher.DEBUG_READS_EXPANDED = true;
253
+ //ClientWatcher.DEBUG_WRITES = true;
254
+ //ClientWatcher.DEBUG_WRITES_EXPANDED = true;
255
+ //Querysub.DEBUG_CALLS = true;
256
+ //PathValueProxyWatcher.TRACE = true;
257
+ //ClientWatcher.DEBUG_TRIGGERS = "light";
258
+ //ClientWatcher.DEBUG_TRIGGERS = "heavy";
259
+ //qreact.debug();
260
+
261
+ //preact.render(<Test />, document.getElementById("main")!);
262
+ //qreact.render(<DynamicComponent propValue={1} />, document.getElementById("main")!);
263
+ //qreact.render(<SyncedTest propValue={1} />, document.getElementById("main")!);
264
+
265
+ //*
266
+ await new Promise(resolve => setTimeout(resolve, 0));
267
+ await pathValueAuthority2.waitUntilRoutingIsReady();
268
+
269
+ let benchmarkComponents = [
270
+ // ONLY run with devtools closed AND disableMeasurements (at the top of the file)! Otherwise the timings will be wrong.
271
+ // qreact is 3X slower
272
+ () => <Benchmark1 count={10000} />,
273
+ // qreact is 3X slower
274
+ () => <Benchmark2 count={10000} />,
275
+ // qreact is 30X slower
276
+ () => <Benchmark3 count={1000} />,
277
+ // qreact is 10X slower
278
+ () => <Benchmark3p5 count={1000} />,
279
+ // qreact is 1.5X slower
280
+ () => <Benchmark4 count={1000} />,
281
+ ];
282
+
283
+ await measureCode(async function renderTest() {
284
+ const main = document.getElementById("main")!;
285
+ async function reset() {
286
+ main.replaceChildren();
287
+ await delay(0);
288
+ }
289
+
290
+ for (let componentFactory of benchmarkComponents) {
291
+ let component = componentFactory();
292
+ let name = (component.type as any).name;
293
+
294
+ await reset();
295
+ let time = Date.now();
296
+ preact.render(component, main);
297
+ time = Date.now() - time;
298
+ preact.render(<div />, main);
299
+ console.log(`preact|${name} took ${formatTime(time)}`);
300
+
301
+ await reset();
302
+ time = Date.now();
303
+ await measureBlock(async () => {
304
+ qreact.render(component, main);
305
+ await clientWatcher.waitForTriggerFinished();
306
+ qreact.render(<div />, main);
307
+ await clientWatcher.waitForTriggerFinished();
308
+ }, "qreact|" + name);
309
+ time = Date.now() - time;
310
+ console.log(`qreact|${name} took ${formatTime(time)}`);
311
+
312
+ qreact.render(<div>done</div>, main);
313
+ }
314
+ }, { minTimeToLog: 0, thresholdInTable: 0 });
315
+ //*/
316
+ }
317
+
318
+ logErrors(main());
319
+ logErrors(browserMain());
320
+
321
+
322
+ let { data, functions } = Querysub.createSchema<{
323
+ values: {
324
+ [key: string]: string;
325
+ };
326
+ }>()({
327
+ domainName: "querysub.com",
328
+ functions: {
329
+ setValue(key: string, value: string) {
330
+ data().values[key] = value;
331
+ }
332
+ },
333
+ module,
334
+ moduleId: "qreactTest",
335
+ functionMetadata: {},
336
+ permissions: {
337
+ PERMISSIONS: () => true
338
+ }
339
+ });
340
+
341
+ class SyncTest extends qreact.Component {
342
+ render() {
343
+ return (
344
+ <div>
345
+ <div>Regular <input value={data().values["a"]} onChange={e => functions.setValue("a", e.currentTarget.value)} /></div>
346
+ <div>Hot <input value={data().values["b"]} onInput={e => functions.setValue("b", e.currentTarget.value)} /></div>
347
+ <div>
348
+ Trigger sources {Array.from(Querysub.getTriggerReason()?.pathSources || []).map(x =>
349
+ <div>
350
+ {getPathFromStr(x.path).join(".")}
351
+ {x.source && <div class={css.marginLeft(10)}>{x.source}</div>}
352
+ </div>
353
+ )}
354
+ </div>
355
+ </div>
356
+ );
357
+ }
358
+ }
359
+
360
+ /*
361
+ async function browserMain2() {
362
+ if (isNode()) return;
363
+
364
+ watchFilesAndTriggerHotReloading();
365
+
366
+ Querysub.DEBUG_CALLS = true;
367
+ ClientWatcher.DEBUG_TRIGGERS = "heavy";
368
+ qreact.debug();
369
+
370
+ qreact.render(preact.createElement(SyncTest, {}), document.getElementById("main")!);
371
+ }
372
+
373
+ async function main2() {
374
+ if (!isNode()) return;
375
+ if (isDeploy()) return;
376
+ if (module.hotreload) return;
377
+ const edgePort = 15060;
378
+ PermissionsCheck.DEBUG = true;
379
+ ClientWatcher.DEBUG_READS = true;
380
+ ClientWatcher.DEBUG_WRITES = true;
381
+
382
+ //SocketFunction.silent = false;
383
+ Error.stackTraceLimit = 20;
384
+
385
+ await Querysub.hostServer({
386
+ trustedDomains: ["querysub.com"],
387
+ port: edgePort,
388
+ rootPath: __dirname + "/../../",
389
+ clientsideEntryPoint: "./src/4-dom/qreactTest.tsx",
390
+ hotReload: true,
391
+ });
392
+ }
393
+
394
+ module.hotreload = isNode() && process.argv[1].includes("PathFunctionRunnerMain.ts");
395
+ module.noserverhotreload = false;
396
+
397
+ logErrors(main2());
398
+ logErrors(browserMain2());
399
+ */
400
+
401
+
402
+ // async function main3() {
403
+ // let test = await proxyWatcher.dryRun({
404
+ // canWrite: true,
405
+ // watchFunction() {
406
+ // schema()["querysub.com"].rejectTest.value = 2;
407
+ // },
408
+ // });
409
+ // let buffer = await pathValueSerializer.serialize(test!);
410
+ // let test2 = await pathValueSerializer.deserialize(buffer);
411
+ // debugger;
412
+ // }
413
+
414
+ // main3().catch(e => console.error(e)).finally(() => process.exit());
415
+
416
+
417
+ // yarn test typenode ./src/4-dom/qreactTest.tsx